Search code examples
pythonpipsetuptoolspypi

How to specify dependencies using setuptools?


My setupfile

setup(
  name = 'arkan',
  version = '1.0a',
  packages=find_packages(exclude=["contrib", "docs", "test*"]),
  install_requires=['demjson', 'simplejson', 'pytz', 'datetime', 'Request', 'urlopen']
)

I submitted to pypitest (https://testpypi.python.org/pypi). When i try to install my package using:

pip install -i https://testpypi.python.org/pypi arkan

Collecting arkan
.....
Collecting demjson(from arkan)
Could not find a version that satisfies the requirement demjson(from arkan) (from versions: )

No matching distribution found for demjson(from arkan)

I get same error for all the packages. I also tried adding version(demjson>=2.2.0) with no luck.

However, when I do pip install demjson from command line, it installs properly. I thought install-requires simply ran pip install on each of the dependency. Am i wrong in this?

I tried addding these dependencies on requirements.txt but pip install ignores the whole file completely.

How do I specify dependencies on my setup.py file so it gets properly installed?


Solution

  • It appears lot of packages such as demjson are missing in testpypi repo.