While I haven't tried it myself, pip 18.1 claims to support PEP 508
URL requirements, which lets you use URLs in your install_requires
(see https://www.python.org/dev/peps/pep-0508 for the syntax - it's a
bit cryptic but it has an example that should help).

On Sun, 23 Dec 2018 at 11:00, Vitaly Krug <vitaly.k...@gmail.com> wrote:
>
> At work, there is an internal source distribution package that is only 
> available on an internal (non-pypi) server, say 
> https://host.company.com/content/selogging-python/1.0.4/selogging-python-1.0.4.tgz
>
> When I add 
> https://host.company.com/content/selogging-python/1.0.4/selogging-python-1.0.4.tgz
>  to the app's requirements.txt and install dependencies via `pip install -r 
> requirements.txt`, then selogging-python installs just fine.
>
> However, when I try to have selogging-python install a s a dependency of my 
> app using the setup() arg dependency_links and "--process-dependency-links" 
> pip option, it doesn't work. If I include selogging_python in setup() arg 
> install_requires (see example below), `pip install 
> dist/my_app-0.1.0-py2.py3-none-any.whl --process-dependency-links` gives the 
> error:
>
> "Could not find a version that satisfies the requirement 
> selogging_python==1.0.4 (from my-app==0.1.0) (from versions: )
> No matching distribution found for selogging_python==1.0.4 (from 
> my-app==0.1.0)"
>
> If I remove selogging_python from install_requires arg, then `pip install 
> dist/my_app-0.1.0-py2.py3-none-any.whl --process-dependency-links` completes 
> successfully, but selogging-python doesn't get mentioned in the terminal 
> output and doesn't get installed either.
>
> ```
>
> $ pip --version
>
> pip 18.1 from /usr/local/lib/python2.7/site-packages/pip (python 2.7)
>
> ```
>
>
> setup.py:
> ```
> import setuptools
> setuptools.setup(
>     name='my_app',
>     version='0.1.0',
>     package_dir={'': 'src'},
>     packages=setuptools.find_packages('src'),
>     zip_safe=True,
>     install_requires['selogging_python==1.0.4']
>     
> dependency_links=['https://host.company.com/content/selogging-python/1.0.4/selogging-python-1.0.4.tgz#egg=selogging_python-1.0.4']
> )
> ```
>
> `python setup.py bdist_wheel`
>
> `pip install dist/my_app-0.1.0-py2.py3-none-any.whl 
> --process-dependency-links`
>
> --
> You received this message because you are subscribed to the Google Groups 
> "virtualenv" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to python-virtualenv+unsubscr...@googlegroups.com.
> To post to this group, send email to python-virtualenv@googlegroups.com.
> Visit this group at https://groups.google.com/group/python-virtualenv.
> For more options, visit https://groups.google.com/d/optout.



-- 
Dr Bruce Merry
bmerry <@> gmail <.> com
http://www.brucemerry.org.za/
http://blog.brucemerry.org.za/

-- 
You received this message because you are subscribed to the Google Groups 
"virtualenv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python-virtualenv+unsubscr...@googlegroups.com.
To post to this group, send email to python-virtualenv@googlegroups.com.
Visit this group at https://groups.google.com/group/python-virtualenv.
For more options, visit https://groups.google.com/d/optout.

Reply via email to