Skip to main content

Generate needed pyproject files to use with setuptools

Project description

generate-pyproject

Before you begin

Please refer to the example-code if you are planning on writing a Python package and distribute it to https://pypi.org


Usage

Install this package:

pip install ops-py-generate-pyproject

Export the VERSION and PROJECT_NAME environment variables

The PyPI project name and version, e.g.:

export VERSION=1.2.3
export PROJECT_NAME=my-fabulous-projects

Run the code

Be sure to be in the directory where the src dir of you code is located. Then run the following:
python3 -m generate_pyproject.generate_pyproject

When executing the above code, the following files should then be generated in the src/my-fabulous-projects directory:

  • setup.py
  • pyproject.toml

Build the pip package

Be sure to be inside the src directory and then run:
python -m build

Upload to pypi.org

Be sure to be inside the src directory and then run:
python -m twine upload --verbose dist/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ops-py-generate-pyproject-2.2.3.tar.gz (4.8 kB view hashes)

Uploaded Source

Built Distribution

ops_py_generate_pyproject-2.2.3-py3-none-any.whl (6.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page