cloudify-cosmo / wagon

Creates Wheel based archives to allow portable offline installation of Python packages and their dependencies
Apache License 2.0
108 stars 14 forks source link

wagon searches system python for constrained dependencies when using embedded python #36

Closed gilzellner closed 8 years ago

gilzellner commented 8 years ago

how to reproduce: install a package with embedded python like: https://gigaspaces-repository-eu.s3.amazonaws.com/org/cloudify3/3.4.0/m5/mgmt-worker-3.4.0~m5-394.el7.x86_64.rpm create a constraints file: pip freeze > const.txt download a wagon which has a dependency that exists in the constraints and doesn't exist in the system python like: http://repository.cloudifysource.org/org/cloudify3/wagons/cloudify-diamond-plugin/1.3.2/cloudify_diamond_plugin-1.3.2-py27-none-linux_x86_64-centos-Core.wgn install with prefix and constraint: wagon install -s cloudify_diamond_plugin-1.3.2-py27-none-linux_x86_64-centos-Core.wgn -a '--prefix /opt/mgmtworker/env/plugins/cloudify-diamond-plugin-1.3.2 --constraint /opt/mgmtworker/env/const.txt --verbose'

one of the errors show usage of wrong pip:

Exception information: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 209, in main status = self.run(options, args) File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 310, in run wb.build(autobuilding=True) File "/usr/lib/python2.7/site-packages/pip/wheel.py", line 748, in build self.requirement_set.prepare_files(self.finder) File "/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 360, in prepare_files ignore_dependencies=self.ignore_dependencies)) File "/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 512, in _prepare_file finder, self.upgrade, require_hashes) File "/usr/lib/python2.7/site-packages/pip/req/req_install.py", line 273, in populate_link self.link = finder.find_requirement(self, upgrade) File "/usr/lib/python2.7/site-packages/pip/index.py", line 489, in find_requirement 'No matching distribution found for %s' % req DistributionNotFound: No matching distribution found for cloudify-plugins-common==3.4a5 (from -c /opt/mgmtworker/env/const.txt (line 8))