how to create wheel package in python from the private git repo

Viewed 810

I've cloned the private repo to my local machine and added setup.py and have added README file and my directory structure looks something similar to this.

 abc/
      abc(cloned private repo)/
          __init__.py
          requirements.txt
          other Related Modules/

      setup.py

      README.md

For better understanding, sharing my setup.py file as well.

setup(
name='<name>',
version='<version>',
author='<author>',
author_email='<email>',
description='',
long_description=readme(),
long_description_content_type="text/markdown",
packages=find_packages(),
install_requires=[],
tests_require=[],
zip_safe=False,
include_package_data=True,
)

I created wheel with following command python setup.py bdist_wheel --universal and it created wheel file inside dist directory of size 55kb. I've hosted this wheel to S3 and made public, it's also downloadable via exposed S3 url That repo size was in MB, also I want to install this package in my package via requirements.txt.

What should be syntax for that, I'm pasted that s3 URL in requirements.txt

1 Answers

I'm not sure if this solves your problem exactly but I had a similar issue trying to install a private package from S3 via a requirements file. I ended up switching to using CodeArtifacts instead of S3 and it worked well. You just install everything through CodeArtifacts. You just need to point pip at the CodeArtifacts repo and it's easy to set PyPI as an upstream repo for all of your other package needs. The AWS documentation on how to do this is good.

Related