ShellRox
ShellRox

Reputation: 2602

ValueError: No PKG-INFO in archive

I've been trying to upload my package to PyPI by taking these steps:

  1. Registering on PyPI

  2. 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
    
  3. Creating LICENSE.TXT, requirements.txt, and setup.cfg inside my package which contained this:

    [metadata]
    
    description-file = README.md
    
  4. 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=[],
    )
    
  5. Converting my package directory to tar.gz file:

tar -czvf Package_name.tar.gz Package_name
  1. And finally, executing this command:
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?

Upvotes: 1

Views: 4169

Answers (1)

phd
phd

Reputation: 94397

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.

Upvotes: 4

Related Questions