Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to make setup.py install a different module
    primarykey
    data
    text
    <p>I would like to use <code>distutils</code> (<code>setup.py</code>) to be able to install a python package (from a local repository), which requires another package from a different local repository. Since I am lacking decent documentation of the <code>setup</code> command (I only found some examples <a href="http://pythonhosted.org/an_example_pypi_project/setuptools.html" rel="nofollow noreferrer">here</a> and <a href="http://docs.python.org/2.7/distutils/examples.html" rel="nofollow noreferrer">here</a>, confused by <code>setup</code>-terms <code>extras_require</code>, <code>install_require</code> and <code>dependency_links</code> found <a href="https://stackoverflow.com/questions/10572603/specifying-optional-dependencies-in-pypi-python-setup-py">here</a> and <a href="https://stackoverflow.com/questions/3472430/how-can-i-make-setuptools-install-a-package-thats-not-on-pypi">here</a>), does anyone have a complete <code>setup.py</code> file that shows how this can be handled, i.e. that <code>distutils</code> handles the installation of a package found in some SVN repository, when the main package I am installing right now requires that? </p> <p>More detailed explanation: I have two local svn (or git) repositories <code>basicmodule</code> and <code>extendedmodule</code>. Now I checkout <code>extendedmodule</code> and run <code>python setup.py install</code>. This <code>setup.py</code> files knows that <code>extendedmodule</code> requires <code>basicmodule</code>, and automatically downloads it from the repository and installs it (in case it is not installed yet). How can I solve this with <code>setup.py</code>? Or maybe there is another, better way to do this?</p> <hr> <p><strong>EDIT: Followup question</strong></p> <p>Based on the answer by Tom I have tried to use a <code>setup.py</code> as follows:</p> <pre><code>from setuptools import setup setup( name = "extralibs", version = "0.0.2", description = ("Some extra libs."), packages=['extralib'], install_requires = "basiclib==1.9dev-r1234", dependency_links = ["https://source.company.xy/svn/MainDir/SVNDir/basiclib/trunk@20479#egg=basiclib-1.9dev-r1234"] </code></pre> <p>)</p> <p>When trying to install this as a normal user I get the following error:</p> <pre><code>error: Can't download https://source.company.xy/svn/MainDir/SVNDir/basiclib/trunk@20479: 401 Authorization Required </code></pre> <p>But when I do a normal <code>svn</code> checkout with the exact same link it works:</p> <pre><code>svn co https://source.company.xy/svn/MainDir/SVNDir/basiclib/trunk@20479 </code></pre> <p>Any suggestion how to solve this without changing ANY configuration of the svn repository? </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload