aboutsummaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-11-14 08:01:31 -1000
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-11-14 08:01:31 -1000
commitaf3d95fdf57e42a1bacb4cd66b58b5b5701d094c (patch)
tree374a8d414b7c1fdae7d2ff6b81980e541b59ae12 /setup.py
parentd9f137db78d451ecb6ef7925b7dec0139ca59898 (diff)
parent62143e47077b8df78e926da5c8f027d8f01ab281 (diff)
downloadcryptography-af3d95fdf57e42a1bacb4cd66b58b5b5701d094c.tar.gz
cryptography-af3d95fdf57e42a1bacb4cd66b58b5b5701d094c.tar.bz2
cryptography-af3d95fdf57e42a1bacb4cd66b58b5b5701d094c.zip
Merge pull request #1468 from dstufft/move-to-src
Move the cryptography package into a src/ subdirectory
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 2a6646db..d98ffdd3 100644
--- a/setup.py
+++ b/setup.py
@@ -27,9 +27,14 @@ from setuptools.command.test import test
base_dir = os.path.dirname(__file__)
+src_dir = os.path.join(base_dir, "src")
+
+# When executing the setup.py, we need to be able to import ourselves, this
+# means that we need to add the src/ directory to the sys.path.
+sys.path.insert(0, src_dir)
about = {}
-with open(os.path.join(base_dir, "cryptography", "__about__.py")) as f:
+with open(os.path.join(src_dir, "cryptography", "__about__.py")) as f:
exec(f.read(), about)
@@ -324,7 +329,8 @@ setup(
"Topic :: Security :: Cryptography",
],
- packages=find_packages(exclude=["tests", "tests.*"]),
+ package_dir={"": "src"},
+ packages=find_packages(where="src", exclude=["tests", "tests.*"]),
include_package_data=True,
install_requires=requirements,