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-123.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-123-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gituptools-123.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-123.tar.gz
Algorithm Hash digest
SHA256 570cef64c8dcbed504f2f18f4fc8ae656f0ddec701e3e788c465fb5a899f7d5f
MD5 b7940e73670596414f79055869ab2d8c
BLAKE2b-256 2bbe47a56432d37a0dc1750c5b225c76cbc236ed1ddbfed72a04d48cd8bc26ac

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gituptools-123-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-123-py3-none-any.whl
Algorithm Hash digest
SHA256 e7034f01a062b4dbf955d34d60ae2d8a7862df916f888b478c904dddecc7b6b4
MD5 9739559ee6c94439c072912f8478d20f
BLAKE2b-256 c6a8f8079ed535b0fd1813050b2bcff361080a29d6594a5b13209eb12e1f94e2

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