Я пытаюсь установить образец /тестовый класс (наследование), используя указанный локальный сервер.
Загрузка на локальный сервер успешна, но установка с помощью этой команды: < /p>
Код: Выделить всё
pip install -i http://:8081/repository/pypi-all/pypi inherits
< /code>
привел к этому: < /p>
Could not find a version that satisfies the requirement inherits
(from versions: )
No matching distribution found for inherits
< /code>
Я также попробовал эти команды, но результаты одинаковы: < /p>
pip install inherits
pip install -i http://:8081/repository/pypi-all/pypi inherits-0.1
pip install -i http://:8081/repository/pypi-all/pypi inherits==0.1
< /code>
Здесь есть содержимое моего ~ /.pypirc: < /p>
[distutils]
index-servers =
nexus
pypi
[nexus]
username: my-username
password: mypassword
repository: http://:8081/nexus/repository/pypi-internal/
[pypi]
...
[global]
index = http://:8081/repository/pypi-all/pypi
index-url = http://:8081/repository/pypi-all/simple
< /code>
Как уже упоминалось, загрузка с использованием команды ниже успешна: < /p>
python setup.py sdist upload -r nexus
< /code>
Ответ с сервера Nexus здесь (т.е. означает, что загрузка была успешной): < /p>
creating inherits-0.1
creating inherits-0.1/inherits
creating inherits-0.1/inherits.egg-info
copying files to inherits-0.1...
copying setup.cfg -> inherits-0.1
copying setup.py -> inherits-0.1
copying inherits/__init__.py -> inherits-0.1/inherits
copying inherits/addmult.py -> inherits-0.1/inherits
copying inherits/inherits.py -> inherits-0.1/inherits
copying inherits/subdiv.py -> inherits-0.1/inherits
copying inherits.egg-info/PKG-INFO -> inherits-0.1/inherits.egg-info
copying inherits.egg-info/SOURCES.txt -> inherits-0.1/inherits.egg-info
copying inherits.egg-info/dependency_links.txt -> inherits-0.1/inherits.egg-info
copying inherits.egg-info/top_level.txt -> inherits-0.1/inherits.egg-info
Writing inherits-0.1/setup.cfg
Creating tar archive
removing 'inherits-0.1' (and everything under it)
running upload
Submitting dist/inherits-0.1.tar.gz to http://:8081/nexus/repository/pypi-internal/
Server response (200): OK
< /code>
Содержание setup.py - основные детали: < /p>
#!/usr/bin/env python
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
requires = []
setup(
name = "inherits",
packages = ["inherits"],
version = '0.1',
description = 'Example inherits package',
#url = "",
#download_url = "",
author = "Jayson Pryde",
classifiers = [],
)
< /code>
Есть идеи о том, как решить это, и заставить PIP установить работу? Заранее спасибо!
Подробнее здесь: https://stackoverflow.com/questions/418 ... g-properly