Wie kann ich Git -Repos als Abhängigkeiten für mein PYPI -Paket verwenden?Python

Python-Programme
Anonymous
 Wie kann ich Git -Repos als Abhängigkeiten für mein PYPI -Paket verwenden?

Post by Anonymous »

Ich habe ein Paket, das ich auf PYPI drücke, und einige der Depedencies sind keine Pakete, sondern installierbare Git -Repositories. Meine Anforderungen.txt < /code> Sieht so aus < /p>

Code: Select all

sphinx_bootstrap_theme>=0.6.5
matplotlib>=2.2.0
numpy>=1.15.0
sphinx>=1.7.5
sphinx-argparse>=0.2.2
tensorboardX
tqdm>=4.24.0
Cython>=0.28.5

# git repos
git+git://github.com/themightyoarfish/svcca-gpu.git
< /code>

Dementsprechend hat mein Setup.py < /code> diesen Inhalt: < /p>

hat#!/usr/bin/env python

from distutils.core import setup
import setuptools
import os

with open('requirements.txt', mode='r') as f:
requirements = f.read()
required_pkgs, required_repos = requirements.split('# git repos')
required_pkgs = required_pkgs.split()
required_repos = required_repos.split()

with open('README.md') as f:
readme = f.read()

setup(name=...
...
packages=setuptools.find_packages('.', include=[...]),
install_requires=required_pkgs,
dependency_links=required_repos,
zip_safe=False,   # don't install egg, but source
)
< /code>

Aber die PIP -Installation 
 < /code> installiert die Git -Abhängigkeit nicht. Ich gehe davon aus, dass PIP 
das Setup -Skript nicht verwendet. Es funktioniert, wenn ich Python setup.py install manuell ausführe. /> Ich habe auch versucht, ab Dependenty_Links zu entfernen und einfach mit dem Repository zu install_requires zu verwenden. Bei der Installation meines Repositorys aus GitHub (das Projekt einschließlich der obigen Dateien) bin ich erfüllt mit < /p>

Code: Select all

    Complete output from command python setup.py egg_info:
error in ikkuna setup command: 'install_requires' must be a string or
list of strings containing valid project/version requirement specifiers; Invalid requirement, parse error at "'+git://g'"
< /code>

Es wurde in anderen Antworten vorgeschlagen, dass man so etwas wie < /p>

setzen kanngit+https://github.com/themightyoarfish/svcca-gpu.git#egg=svcca
< /code>

In Anforderungen.txt < /code>, aber das schlägt mit < /p>

fehl   error in  setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Invalid requirement, parse error at "'+https:/'
Frage: (Wie) Kann ich Git -Repositories als Abhängigkeiten für ein PIP -Paket auflisten?

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post