Pourquoi ce qui suit se produit-il lorsque j'essaie d'enregistrer mon paquet sur le site de test? Il enregistre avec le site régulier, très bien:/Inscription sur la ligne de commande du site de test PyPI ValueError
Voilà ce qui arrive à ma ligne de commande lorsque je tente d'inscrire sur le site de test pypi:
PS C:\Users\Dave\Desktop\distributing\hellodmt2Distribution> python setup.py register -r https://testpypi.python.org
i
running register
running egg_info
writing hellodmt2.egg-info\PKG-INFO
writing top-level names to hellodmt2.egg-info\top_level.txt
writing dependency_links to hellodmt2.egg-info\dependency_links.txt
reading manifest file 'hellodmt2.egg-info\SOURCES.txt'
writing manifest file 'hellodmt2.egg-info\SOURCES.txt'
Traceback (most recent call last):
File "setup.py", line 14, in <module>
download_url = "https://github.com/dmt257/hellodmt2/archive/0.1.tar.gz",
File "C:\Python27\lib\distutils\core.py", line 151, in setup
dist.run_commands()
File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\lib\site-packages\setuptools\command\register.py", line 10, in run
orig.register.run(self)
File "C:\Python27\lib\distutils\command\register.py", line 46, in run
self._set_config()
File "C:\Python27\lib\distutils\command\register.py", line 81, in _set_config
raise ValueError('%s not found in .pypirc' % self.repository)
ValueError: https://testpypi.python.org/pypi not found in .pypirc
PS C:\Users\Dave\Desktop\distributing\hellodmt2Distribution>
Mon setup.py:
#!/usr/bin/env
try:
from setuptools import setup
except importError:
from distutils.core import setup
setup(name = "hellodmt2",
description = "a source distribution test",
version = "0.1",
author = "David",
author_email = "[email protected]",
py_modules = ["hellodmt2"],
url = "https://github.com/dmt257/hellodmt2",
download_url = "https://github.com/dmt257/hellodmt2/archive/0.1.zip",
keywords = ["testing"],
)
Ceci est mon pypirc:
[distutils]
index-servers=
pypi
pypitest
[pypitest]
repository = https://testpypi.python.org/pypi
username = dmt257
password = mypasswordhere
[pypi]
repository = https://pypi.python.org/pypi
username = dmt257
password = mypasswordhere
Le fichier doit être '.pypirc' (notez la menant '.') ou est-ce juste une faute de frappe? Où avez-vous localisé ce fichier? – SiHa
Le fichier est 'pypi.pypirc'. J'ai indiqué son emplacement dans les variables système -> Chemin. Je pense que je dois faire un var env à domicile et indiquer son emplacement là-bas? –