Skip to content

Commit

Permalink
Merge pull request #36 from graingert/pyproject-toml-full
Browse files Browse the repository at this point in the history
switch to pyproject.toml metadata
  • Loading branch information
graingert authored Oct 26, 2023
2 parents e2c9565 + 2a086e8 commit e1acc5e
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 52 deletions.
41 changes: 41 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,44 @@
[build-system]
requires = ["setuptools>=68.2", "versioneer[toml]==0.29"]
build-backend = "setuptools.build_meta"

[project]
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries :: Python Modules",
]
description = "Symbolic constants in Python"
readme = "README.rst"
keywords = ["constants", "enum", "twisted"]
license = {text = "MIT"}
name = "constantly"
maintainers = [{name = "Twisted Matrix Labs Developers"}]
urls = {Homepage = "https://github.com/twisted/constantly"}
requires-python = ">= 3.8"
dynamic = ["version"]

[tool.setuptools]
include-package-data = false

[tool.setuptools.packages]
find = {namespaces = false}

[tool.versioneer]
VCS = "git"
style = "pep440"
versionfile_source = "constantly/_version.py"
versionfile_build = "constantly/_version.py"
tag_prefix = ""
parentdir_prefix = "constantly-"
10 changes: 0 additions & 10 deletions setup.cfg

This file was deleted.

47 changes: 5 additions & 42 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,48 +1,11 @@
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.

import codecs
import os
import versioneer

from setuptools import find_packages, setup
from setuptools import setup

def read(*parts):
"""
Build an absolute path from C{parts} and and return the contents of the
resulting file. Assume UTF-8 encoding.
"""
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, *parts), 'r', 'utf-8') as f:
return f.read()

if __name__ == "__main__":
setup(
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Software Development :: Libraries :: Python Modules'
],
description="Symbolic constants in Python",
long_description=read('README.rst'),
keywords="constants,enum,twisted",
license="MIT",
name="constantly",
packages=find_packages(),
url="https://github.com/twisted/constantly",
maintainer='Twisted Matrix Labs Developers',
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
python_requires=">= 3.8",
)
setup(
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
)

0 comments on commit e1acc5e

Please sign in to comment.