Skip to main content

Python tool for helping making shorter and smarter setup.py scripts

Project description

Extended SetupTools

Python tool for helping in making shorter and smarter setup.py scripts.

Features

  • Automatically extracts application meta-info from the root __init__.py file:
    • Name
    • Version
    • License
  • Automatically finds packages
  • Finds and attaches ReadMe file
  • Handles requirements files and maps to the respective requires setup arguments:
    • setup_requires: setup-requirements.txt and requirements/setup-requirements.txt
    • install_requires: requirements.txt and requirements/requirements.txt
    • tests_require: test-requirements.txt and requirements/test-requirements.txt
    • extras_require: requirements/requirements-*.txt
    • Also creates extras all that contains all available features
  • Creates test runner with HTML reports
  • Inserts link to the repository as the homepage

Usage

Modern Style

In your pyproject.toml, add the following:

[build-system]
requires = [ 'setuptools', 'extended-setup-tools >= 0.2.2' ]
build-backend = 'setuptools.build_meta'

Legacy Style

Install package:

python -m pip install extended-setup-tools

Instead of installing to the current scope, it is possible to install this package as setup_requires step:

from setuptools import _install_setup_requires
_install_setup_requires(dict(setup_requires=[ 'extended-setup-tools' ]))

src/python_package_name/__init__.py

from collections import namedtuple

__title__ = 'my-package'
__author__ = 'Peter Zaitcev / USSX Hares'
__license__ = 'BSD 2-clause'
__copyright__ = 'Copyright 2021 Peter Zaitcev'
__version__ = '0.1.0'

VersionInfo = namedtuple('VersionInfo', 'major minor micro releaselevel serial')
version_info = VersionInfo(*__version__.split('.'), releaselevel='alpha', serial=0)

__all__ = \
[
    'version_info',
    '__title__',
    '__author__',
    '__license__',
    '__copyright__',
    '__version__',
]

setup.py

from extended_setup import ExtendedSetupManager
ExtendedSetupManager('python_package_name').setup \
(
    short_description = "Some short description",
    classifiers = [ 'Programming Language :: Python :: 3.7' ],
)

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

extended_setup_tools-0.2.6.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

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

extended_setup_tools-0.2.6-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file extended_setup_tools-0.2.6.tar.gz.

File metadata

  • Download URL: extended_setup_tools-0.2.6.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for extended_setup_tools-0.2.6.tar.gz
Algorithm Hash digest
SHA256 b5233bd88282a64ef4825343e90f7268989260e2d4c34d66e4c4260c3083edef
MD5 ad18ef010c953a2c77db939da2b7da43
BLAKE2b-256 96b2d6e5ba5b23d728a7936a037a8d487e832617d7577d6f94ef28057d63973e

See more details on using hashes here.

File details

Details for the file extended_setup_tools-0.2.6-py3-none-any.whl.

File metadata

File hashes

Hashes for extended_setup_tools-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 1d5ee98a2f1286fef42d8d9a2e39a63b14b6b063c6440d6b654eef9a3c58275f
MD5 444ed91c8ad4d71476206f8adf9a571c
BLAKE2b-256 83d1fb96caf6266a28e5b01130f3524a544d5fadbb360443b68c7d93291821e9

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