Python setup.py dependency links for GemFury packages

I have several Python packages successfully uploaded to GemFury using

git push fury master 

after installing my remote.

Now I want to use these hosted GemFury packages in assemblies of other packages (some on GemFury, others not). I decided to do this by researching how to update setup.py to host 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 be retrieved from GemFury if it is not installed locally.

As you can see, I tried several different ways to make the dependency links work correctly, but nothing worked. I get the following error:

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

Any ideas?

+5
source share
2 answers

You need what I assume is the version identifier of the Gemfury package.

You can find this by going to the Gemfury website and looking at the manual link to download the package.

eg; https://manage.fury.io/1/versions/ {x_here} / download? as = john

Change the link to the dependent link below.

 dependency_links=['https://pypi.fury.io/{gemfury_account_name}/-/{gemfury_package_version_id}/{package_name_and_version}?auth={gemfury_auth_hash}'] 
+3
source

I solved this by putting the following

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

one for each package_name. I need.

0
source

Source: https://habr.com/ru/post/1261102/


All Articles