I've been trying to upload my package to PyPI by taking these steps:
Registering on PyPI
Creating a hidden .pypirc
file in my home directory (~/) containing:
[distutils]
index-servers = pypi
[pypi]
repository=https://pypi.python.org/pypi
username=my_username
password=my_password
Creating LICENSE.TXT
, requirements.txt
, and setup.cfg
inside my package which contained this:
[metadata]
description-file = README.md
Creating setup.py
inside my package containing this:
from setuptools import setup
setup(
name='Package_name',
packages=['Package_name'],
version='1.0',
description='Description,
author= 'ShellRox',
author_email='Email',
url='Github url',
download_url='Github download url',
keywords=['authentication', 'steam', 'simple'],
classifiers=[],
)
Converting my package directory to tar.gz
file:
tar -czvf Package_name.tar.gz Package_name
twine upload package_name.tar.gz
From which, I received this error:
ValueError: No PKG-INFO in archive: PATH_HERE
I know that similar question has been asked before, But as you see i have already practiced solution question's only answer provided, But it didn't seem to work.
How should I put PKG-INFO
in my archive? Could there be some problem?
To create a source distribution you need (instead of tar
):
python setup.py sdist
Verify it before uploading — you may need to adjust MANIFEST
or MANIFEST.in to include everything.
To create binary packages:
python setup.py bdist_egg
and/or
python setup.py bdist_wheel
Then twine upload dist/*
.
Read docs and Python Packaging User Guide.