Why is pip install missing source of my package?

Question:

I have a private package which I have uploaded to my private devpi server. When I use pip to install it, only the egg folder is installed. The source is missing and hence I am unable to use any code or libraries in my package.

My setup.py:

from setuptools import setup, find_packages

setup(
  name='my-package',
  version=1.0,
  packages=find_packages(),
  install_requires=[
      'requests>=2.21.0',
  ]
)

I am using a venv within Pycharm to do all of this. Why is this happening? How can I force pip to download and install the source distribution?

[EDIT]
When I download the tarball from my devpi server UI, it does NOT contain the source. Which means that when I upload the package with devpi upload it is not uploading the sdist? I could not find anything on how to force devpi to force to upload an sdist.

Here is the build log:

running sdist
running egg_info
writing ****.egg-info/PKG-INFO
writing dependency_links to ****.egg-info/dependency_links.txt
writing requirements to ****.egg-info/requires.txt
writing top-level names to ****.egg-info/top_level.txt
reading manifest file '****.egg-info/SOURCES.txt'
writing manifest file '****.egg-info/SOURCES.txt'
running check
warning: Check: missing required meta-data: url

warning: Check: missing meta-data: either (author and author_email) or (maintainer and maintainer_email) must be supplied

creating ...
creating ***.egg-info
creating ***-1.0/client
creating ***-1.0/client/model
copying files to ***-1.0...
copying README.md -> ****-1.0
copying setup.py -> ****-1.0
copying ****.egg-info/PKG-INFO -> ****-1.0/****.egg-info
copying ****.egg-info/SOURCES.txt -> ****-1.0/****.egg-info
copying ****.egg-info/dependency_links.txt -> ****-1.0/****.egg-info
copying ****.egg-info/requires.txt -> ****-1.0/****.egg-info
copying ****.egg-info/top_level.txt -> ****-1.0/****.egg-info
copying the actual source here
Writing ****-1.0/setup.cfg
Creating tar archive
removing '****-1.0' (and everything under it)
Asked By: ritratt

||

Answers:

This fixed it:

devpi upload dist/pkg-ver.tar.gz

Basically, run it from root of my project.

Answered By: ritratt
Categories: questions Tags: , , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.