Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python setup.py dependency links for GemFury packages

I have several Python packages successfully uploaded to GemFury using

git push fury master

after having set my remote.

Now I want to use these GemFury hosted packages in the builds of other packages (some on GemFury, others not). I set out doing this by investigating how to update my setup.py to accommodate for this new source:

from setuptools import setup

setup(name='my_package',
      version='0.1',
      description='my_package package',
      url='https://bitbucket.org/me/my_package',
      packages=['my_package'],
      install_requires=[
            'package_on_gemfury==0.1',
            'pandas==0.19.0',
            'numpy==1.11.2',
      ],
      dependency_links=[
                  'https://pypi.fury.io/[KEY]/me/'
                  # 'https://pypi.fury.io/[KEY]/me/#egg=package_on_gemfury-0.1'
                  # 'https://pypi.fury.io/me/package_on_gemfury?auth=[KEY]'
      ],
      test_suite='nose2.collector.collector',
      tests_require=['nose2'],
      include_package_data=True,
      zip_safe=False)

Then I run this:

sudo pip install .

It works if my_package is installed locally, but it will not pull from GemFury if not installed locally.

As you can see I tried several different ways to get the dependency links working properly, but nothing has worked. I get the following error:

"Could not find a version that satisfies the requirement package_on_gemfury==0.1 (from my_package==0.1) (from versions: ) No matching distribution found for package_on_gemfury==0.1 (from my_package==0.1)"

Any ideas?

like image 358
Grant Bartel Avatar asked Dec 11 '16 11:12

Grant Bartel


1 Answers

I solved this putting the following

https://pypi.fury.io/[token]/[me]/[package_name]/

one for each package_name I need.

like image 182
Daniele Murroni Avatar answered Oct 21 '22 08:10

Daniele Murroni