You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This use case works with pip 9.0.3, fails with pip 10.0. I'll illustrate this in terms of two of my packages, one of which has a dependency on the other. This is basically how my SQLAlchemy / Openstack CI servers run, where I have to inject specific git versions of SQLAlchemy into the build. Started failing as of pip 10.
# make a venv
python2 -m virtualenv .venv
# make sure we have pip 10
.venv/bin/pip install pip --upgrade
# checkout sqlalchemy and alembic, alembic has a dependency on sqlalchemy
git clone https://bitbucket.org/zzzeek/sqlalchemy
git clone https://bitbucket.org/zzzeek/alembic
# a requirements file
echo "SQLAlchemy" > requirements.txt
# make a constraints file with the "git master" of the SQLAlchemy checkout
echo "git+file://"`pwd`"/sqlalchemy@master#egg=SQLAlchemy" > constraints.txt
# install SQLAlchemy, works
.venv/bin/pip install -c constraints.txt -r requirements.txt
# install project with a dependency on SQLAlchemy, fails
.venv/bin/pip install -c constraints.txt -e alembic
upon installing Alembic, when it goes to install SQLAlchemy again I get this stack trace:
Traceback (most recent call last):
File "/home/classic/Desktop/tmp2/.venv/lib/python2.7/site-packages/pip/_internal/basecommand.py", line 228, in main
status = self.run(options, args)
File "/home/classic/Desktop/tmp2/.venv/lib/python2.7/site-packages/pip/_internal/commands/install.py", line 305, in run
session=session, autobuilding=True
File "/home/classic/Desktop/tmp2/.venv/lib/python2.7/site-packages/pip/_internal/wheel.py", line 773, in build
python_tag=python_tag,
File "/home/classic/Desktop/tmp2/.venv/lib/python2.7/site-packages/pip/_internal/wheel.py", line 633, in _build_one
python_tag=python_tag)
File "/home/classic/Desktop/tmp2/.venv/lib/python2.7/site-packages/pip/_internal/wheel.py", line 637, in _build_one_inside_env
if self.__build_one(req, temp_dir.path, python_tag=python_tag):
File "/home/classic/Desktop/tmp2/.venv/lib/python2.7/site-packages/pip/_internal/wheel.py", line 663, in __build_one
base_args = self._base_setup_args(req)
File "/home/classic/Desktop/tmp2/.venv/lib/python2.7/site-packages/pip/_internal/wheel.py", line 659, in _base_setup_args
SETUPTOOLS_SHIM % req.setup_py
File "/home/classic/Desktop/tmp2/.venv/lib/python2.7/site-packages/pip/_internal/req/req_install.py", line 415, in setup_py
assert self.source_dir, "No source dir for %s" % self
AssertionError: No source dir for SQLAlchemy from git+file:///home/classic/Desktop/tmp2/sqlalchemy@master#egg=SQLAlchemy in ./.venv/lib/python2.7/site-packages (from -c constraints.txt (line 1))
Here's a full session with all output:
[classic@photon2 tmp2]$ python2 -m virtualenv .venv
New python executable in /home/classic/Desktop/tmp2/.venv/bin/python2
Also creating executable in /home/classic/Desktop/tmp2/.venv/bin/python
Installing setuptools, pip, wheel...done.
[classic@photon2 tmp2]$ .venv/bin/pip install pip --upgrade
Requirement already up-to-date: pip in ./.venv/lib/python2.7/site-packages (10.0.0)
[classic@photon2 tmp2]$ git clone https://bitbucket.org/zzzeek/sqlalchemy
Cloning into 'sqlalchemy'...
remote: Counting objects: 134717, done.
remote: Compressing objects: 100% (20714/20714), done.
remote: Total 134717 (delta 102656), reused 132244 (delta 100696)
Receiving objects: 100% (134717/134717), 27.99 MiB | 1.46 MiB/s, done.
Resolving deltas: 100% (102656/102656), done.
[classic@photon2 tmp2]$ git clone https://bitbucket.org/zzzeek/alembic
Cloning into 'alembic'...
remote: Counting objects: 8542, done.
remote: Compressing objects: 100% (2395/2395), done.
remote: Total 8542 (delta 6396), reused 7632 (delta 5665)
Receiving objects: 100% (8542/8542), 1.58 MiB | 1.34 MiB/s, done.
Resolving deltas: 100% (6396/6396), done.
[classic@photon2 tmp2]$ echo "SQLAlchemy" > requirements.txt
[classic@photon2 tmp2]$ echo "git+file://"`pwd`"/sqlalchemy@master#egg=SQLAlchemy" > constraints.txt
[classic@photon2 tmp2]$ cat constraints.txt
git+file:///home/classic/Desktop/tmp2/sqlalchemy@master#egg=SQLAlchemy
[classic@photon2 tmp2]$ .venv/bin/pip install -c constraints.txt -r requirements.txt
Collecting SQLAlchemy from git+file:///home/classic/Desktop/tmp2/sqlalchemy@master#egg=SQLAlchemy (from -c constraints.txt (line 1))
Cloning file:///home/classic/Desktop/tmp2/sqlalchemy (to revision master) to /tmp/pip-install-yEKWsH/SQLAlchemy
Building wheels for collected packages: SQLAlchemy
Running setup.py bdist_wheel for SQLAlchemy ... done
Stored in directory: /tmp/pip-ephem-wheel-cache-vH4DD5/wheels/15/7a/d3/6ddd5887b5a43082250a0b978babb3802f86939cb0252fd747
Successfully built SQLAlchemy
Installing collected packages: SQLAlchemy
Successfully installed SQLAlchemy-1.3.0b1.dev0
[classic@photon2 tmp2]$ .venv/bin/pip install -c constraints.txt -e alembic
Obtaining file:///home/classic/Desktop/tmp2/alembic
Requirement already satisfied: SQLAlchemy from git+file:///home/classic/Desktop/tmp2/sqlalchemy@master#egg=SQLAlchemy in ./.venv/lib/python2.7/site-packages (from -c constraints.txt (line 1)) (1.3.0b1.dev0)
Collecting Mako (from alembic==0.9.10.dev0)
Downloading https://files.pythonhosted.org/packages/eb/f3/67579bb486517c0d49547f9697e36582cd19dafb5df9e687ed8e22de57fa/Mako-1.0.7.tar.gz (564kB)
100% |████████████████████████████████| 573kB 1.7MB/s
Collecting python-editor>=0.3 (from alembic==0.9.10.dev0)
Downloading https://files.pythonhosted.org/packages/65/1e/adf6e000ea5dc909aa420352d6ba37f16434c8a3c2fa030445411a1ed545/python-editor-1.0.3.tar.gz
Collecting python-dateutil (from alembic==0.9.10.dev0)
Downloading https://files.pythonhosted.org/packages/0c/57/19f3a65bcf6d5be570ee8c35a5398496e10a0ddcbc95393b2d17f86aaaf8/python_dateutil-2.7.2-py2.py3-none-any.whl (212kB)
100% |████████████████████████████████| 215kB 1.8MB/s
Collecting MarkupSafe>=0.9.2 (from Mako->alembic==0.9.10.dev0)
Downloading https://files.pythonhosted.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz
Collecting six>=1.5 (from python-dateutil->alembic==0.9.10.dev0)
Downloading https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Building wheels for collected packages: SQLAlchemy, Mako, python-editor, MarkupSafe
Exception:
Traceback (most recent call last):
File "/home/classic/Desktop/tmp2/.venv/lib/python2.7/site-packages/pip/_internal/basecommand.py", line 228, in main
status = self.run(options, args)
File "/home/classic/Desktop/tmp2/.venv/lib/python2.7/site-packages/pip/_internal/commands/install.py", line 305, in run
session=session, autobuilding=True
File "/home/classic/Desktop/tmp2/.venv/lib/python2.7/site-packages/pip/_internal/wheel.py", line 773, in build
python_tag=python_tag,
File "/home/classic/Desktop/tmp2/.venv/lib/python2.7/site-packages/pip/_internal/wheel.py", line 633, in _build_one
python_tag=python_tag)
File "/home/classic/Desktop/tmp2/.venv/lib/python2.7/site-packages/pip/_internal/wheel.py", line 637, in _build_one_inside_env
if self.__build_one(req, temp_dir.path, python_tag=python_tag):
File "/home/classic/Desktop/tmp2/.venv/lib/python2.7/site-packages/pip/_internal/wheel.py", line 663, in __build_one
base_args = self._base_setup_args(req)
File "/home/classic/Desktop/tmp2/.venv/lib/python2.7/site-packages/pip/_internal/wheel.py", line 659, in _base_setup_args
SETUPTOOLS_SHIM % req.setup_py
File "/home/classic/Desktop/tmp2/.venv/lib/python2.7/site-packages/pip/_internal/req/req_install.py", line 415, in setup_py
assert self.source_dir, "No source dir for %s" % self
AssertionError: No source dir for SQLAlchemy from git+file:///home/classic/Desktop/tmp2/sqlalchemy@master#egg=SQLAlchemy in ./.venv/lib/python2.7/site-packages (from -c constraints.txt (line 1))
The text was updated successfully, but these errors were encountered:
This use case works with pip 9.0.3, fails with pip 10.0. I'll illustrate this in terms of two of my packages, one of which has a dependency on the other. This is basically how my SQLAlchemy / Openstack CI servers run, where I have to inject specific git versions of SQLAlchemy into the build. Started failing as of pip 10.
upon installing Alembic, when it goes to install SQLAlchemy again I get this stack trace:
Here's a full session with all output:
The text was updated successfully, but these errors were encountered: