I'm trying to regsiter my package on PyPi, with the following command:
pyton setup.py register
But it results in the following error:
Server response (500): <urlopen error [Errno -2] Name or service not known>
I even deleted the ~/.pypirc file and tried again issuing the command but that too results in the same error. My setup.py script is as follows:
from setuptools import setup
from setuptools import find_packages
setup(
name="xxxxx",
version="0.0.1",
author="someone",
author_email="[email protected]",
url="https://github.com/someone",
packages=['folder_name',],
license="MIT License",
description = " Sample Description",
long_description = open("README").read(),
install_requires = ["python-mwapi"],
)
Importing setup from distutils solved the issue.
Replacing the first two lines with this made it work:
from distutils.core import setup
And once you have registered your package name using distutils.core
, you can again go back and use setuptools
in your setup.py file. From then on everything seems to work fine.