Skip to main content

Setuptools helper for packaging Python from Gitlab.

Project description

PyPi Latest CircleCI

Build Codecov Docs Quality Gate Status

Security Rating Vulnerabilities Bugs Reliability Rating Lines of Code

Package Status PyVersions PyPI Downloads

License

Welcome to Gituptools

Gituptools is a helper for packing Python on Gitlab CICD runners. It basically gets as much from the runtime environment as it can to fill in all the packaging metadata that a typical setup.py file needs.

Gituptools is 100% standard library. No 3rd party dependencies.

See the Documentation for more help.

Installation

From PyPI directly:

pip install gituptools

Examples

This is all you need in a setup.py file if you are building on Gitlab CICD.

import gituptools

if __name__ == '__main__':
    gituptools.setup()

This is the optional pyproject.toml you can use.

[build-system]
requires = ["gituptools"]

This is a basic example of a .gitlab-ci.yml file to build and publish your package.

image: python:latest

stages:
    - Build
    - Publish

PyPackage:
    stage: Build
    artifacts:
        paths: [dist/*]
    script:
        # option 1: with a pyproject.toml
        - python -m install -U build
        - python -m build
        # option 2: just do it the old way
        - python setup.py sdist bdist_wheel

PyPi:
    stage: Publish
    needs:
        - job: PyPackage
          artifacts: true
    script:
        - python -m install twine
        - >
          twine upload
          --username $YOUR_USERNAME
          --password $YOUR_PASSWORD
          --verbose
          --non-interactive
          dist/*

SonarCloud

Quality gate

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

gituptools-124.tar.gz (9.5 kB view hashes)

Uploaded Source

Built Distribution

gituptools-124-py3-none-any.whl (9.5 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