On Mon, Feb 11, 2013 at 1:10 PM, Erik Bernoth <erik.bern...@gmail.com>wrote:

> Hi everybody,
>
> I think I pretty much read all of the http://docs.python.org/2/distutils/and 
> started to create a pypi repository for my project (
> http://pypi.python.org/pypi/monk_tf). Now there are some things that are
> not so clear from the documentation, with the most important being
> requirement handling.
>
> I have the same requirements written down in two ways:
>  a) a requirements.txt file, which can be called with pip install -r
> requirements.txt. Yet I don't see any user downloading a requirements.txt
> file from somewhere, then installing it and only then afterwards getting
> started with actually installing the package they want to install. Who
> would do that?
>
>  b) requires attribute in the setup function call in setup.py. For some
> reason pip completely seems to ignore it. I tested the following way (come
> along with the code from https://github.com/DFE/MONK, if you like):
>
>     $ cd MONK
>     $ python setup.py sdist
>     $ cd dist
>     $ tar xfvz monk_tf-v0.1.1.tar.gz
>     $ cd monk_tf-v0.1.1
>     $ python setup.py install
>     running install
>     running build
>     running build_py
>     running install_lib
>     running install_egg_info
>     Writing /usr/local/lib/python2.7/dist-packages/monk_tf-v0.1.1.egg-info
>     $python
>     >> import monk_tf
>     (Exception, because a required package can't be found)
>
> So this also didn't seem to install any of the required packages.
>
> I'd really like to know, what I am doing wrong here. Anybody ideas or
> suggestions? Is there another way to tell distutils about the packages that
> should be installed before my package is installed?
>
> Cheers
> Erik
>

Generally requires.txt is for specific versions of dependencies and the
setup.py list is more permissive.

Try using pip to install your sdist instead of running setup.py directly.
_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to