Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust setup.py's install_requires #55

Closed
warsaw opened this issue Mar 23, 2015 · 1 comment
Closed

Adjust setup.py's install_requires #55

warsaw opened this issue Mar 23, 2015 · 1 comment

Comments

@warsaw
Copy link
Contributor

warsaw commented Mar 23, 2015

setup.py limits setuptools in its install_requires to >=2.2,<8. This breaks the build of pex on Ubuntu 15.04 where we have setuptools 12.2. It'll break on Debian too after Jessie is released.

I added the following very simple patch, which so far seems to fix the problem (more testing ahead).

--- a/setup.py
+++ b/setup.py
@@ -36,7 +36,7 @@
     'pex.bin',
   ],
   install_requires = [
-    'setuptools>=2.2,<8',
+    'setuptools>=2.2',
   ],
   tests_require = [
     'mock',
@wickman
Copy link
Contributor

wickman commented Mar 23, 2015

The only gotcha here is pkg_resources becoming a package. I have a branch that removes this requirement as well. I think the following is the only diff necessary:

diff --git a/pex/pex_builder.py b/pex/pex_builder.py
index aef19e6..8b9911d 100644
--- a/pex/pex_builder.py
+++ b/pex/pex_builder.py
@@ -300,7 +300,7 @@ class PEXBuilder(object):
       raise RuntimeError('Failed to find setuptools while building pex!')

     for fn, content_stream in DistributionHelper.walk_data(setuptools):
-      if fn == 'pkg_resources.py' or fn.startswith('_markerlib'):
+      if fn.startswith('pkg_resources') or fn.startswith('_markerlib'):
         self._chroot.write(content_stream.read(), os.path.join(self.BOOTSTRAP_DIR, fn), 'resource')
         wrote_setuptools = True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants