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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gituptools-124-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file gituptools-124.tar.gz.

File metadata

  • Download URL: gituptools-124.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for gituptools-124.tar.gz
Algorithm Hash digest
SHA256 8fe8e83d61e78e1e77a26ac61eeef62de9ede90972b4c9374b3aae597e3a7b2b
MD5 4a6a3d3f11fcbba17cde3f9ca8404b9e
BLAKE2b-256 2957c6888cdafdf50a95ea9242c0e25bef9b66c1e3ec608eb68727fd4be55542

See more details on using hashes here.

File details

Details for the file gituptools-124-py3-none-any.whl.

File metadata

  • Download URL: gituptools-124-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for gituptools-124-py3-none-any.whl
Algorithm Hash digest
SHA256 c308836f5f6b8f1899b7f056935b8bc35744b5849855f4785882f721c723f59f
MD5 c7626d857968720105ecbf18d0edd8ea
BLAKE2b-256 6463fe39d2246c099e546cd3c274614cd88d8e3d9684d2fad481008aa2d50867

See more details on using hashes here.

Supported by

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