0

I am about to build a new python lib and I was seeking information concerning packaging in Python.

I understand that "setup.py" is the script that controls everything. I wonder how to deal with it when there are external libraries in svn for instance.

How to download automatically a given version from the repository using "setup.py" ?

5
  • "are external libraries in svn"? What do you mean by this? Please provide more details. Commented Sep 15, 2011 at 17:48
  • Yes the external libraries are in svn. To be more precise one of the external libraries is in svn but it does not have a "setup.py" in the package. How could I could I force my project to download this external library ? Hope this will help. Commented Sep 16, 2011 at 8:56
  • "external library"? Is it on pypi? Why do you have it in your SVN? Do you have the entire distribution kit (untouched) available, including the license? Does the license permit restribution? Commented Sep 16, 2011 at 9:50
  • I work in a company thus the code is stored under a vcs and we are behind a firewall. It can not on Pypi. I managed to create a ".egg". Now this egg is stored on a local path for instance \\my_network_path\python\new_egg.egg and I would like to install it using "pip install" command but I have the following error ValueError: ('Expected version spec in'\\my_network_path\python\new_egg.egg', 'at', '\\my_network_path\python\new_egg.egg'. Commented Sep 16, 2011 at 17:48
  • Please do not post code in a comment. PLease do not add comments to your own question. Please delete the hard-to-read comments. Please update your question to contain all the facts. Commented Sep 16, 2011 at 17:50

2 Answers 2

1

docs for this are at the cheese shop

use the requires keyword

Sign up to request clarification or add additional context in comments.

1 Comment

requires is an old idea that does not work at all. distutils effectively does not support dependencies, you have to use a third-party (i.e. not in the standard library shipped with Python) tool like pip to handle dependencies. We’re working on fixing that.
0

I may not have understood the problem correctly. For any additional dependencies, you mention them in setup.py as

install_requires=['module1 >= 1.3', 'module2 >=1.8.2']

When you use setuptools, easy_install oo pip, these external dependencies will get installed during setup, if required. These should also be available in package repositories for download.

1 Comment

I guess the OP wants setup.py to automatically download a specific software from a given svn repository for him, in which case, an external script for updating svn repo has to be executed when the required dependency is not fulfilled.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.