Port to declarative setuptools configuration
This commit is contained in:
parent
c464cecfff
commit
1209f5f08f
3 changed files with 50 additions and 64 deletions
9
pyproject.toml
Normal file
9
pyproject.toml
Normal file
|
@ -0,0 +1,9 @@
|
|||
[build-system]
|
||||
requires = ["setuptools"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[tool.black]
|
||||
line-length = 120
|
||||
target-version = ["py38"]
|
||||
include = '\.pyi?$'
|
||||
|
41
setup.cfg
Normal file
41
setup.cfg
Normal file
|
@ -0,0 +1,41 @@
|
|||
[metadata]
|
||||
name = rust2rpm
|
||||
version = attr: rust2rpm.__version__
|
||||
description = Generate RPM packages for Rust crates
|
||||
long_description = file: README.md
|
||||
keywords = rpm, cargo, rust
|
||||
license = MIT
|
||||
url = https://pagure.io/fedora-rust/rust2rpm
|
||||
author = Fedora Rust SIG
|
||||
author_email = rust@lists.fedoraproject.org
|
||||
classifiers =
|
||||
Development Status :: 5 - Production/Stable
|
||||
Intended Audience :: Developers
|
||||
License :: OSI Approved :: MIT License
|
||||
Operating System :: POSIX :: Linux
|
||||
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
|
||||
Topic :: Software Development :: Build Tools
|
||||
Topic :: System :: Software Distribution
|
||||
Topic :: Utilities
|
||||
|
||||
[options]
|
||||
include_package_data = True
|
||||
packages = rust2rpm, rust2rpm.core
|
||||
install_requires =
|
||||
jinja2
|
||||
pyparsing
|
||||
requests
|
||||
tqdm
|
||||
|
||||
[options.package_data]
|
||||
rust2rpm = *.csv, templates/*.spec, templates/*.spec.inc
|
||||
|
||||
[options.entry_points]
|
||||
console_scripts =
|
||||
rust2rpm = rust2rpm.__main__:main
|
||||
cargo-inspector = rust2rpm.core.inspector:main
|
||||
|
64
setup.py
64
setup.py
|
@ -1,64 +0,0 @@
|
|||
from setuptools import setup
|
||||
|
||||
def read_version(path):
|
||||
with open(path, 'rt') as f:
|
||||
for line in f:
|
||||
if line.startswith('__version__'):
|
||||
return line.split("'")[1]
|
||||
raise IOError
|
||||
|
||||
version = read_version('rust2rpm/__init__.py')
|
||||
|
||||
ARGS = dict(
|
||||
name="rust2rpm",
|
||||
version=version,
|
||||
description="Convert Rust crates to RPM",
|
||||
license="MIT",
|
||||
keywords="rust cargo rpm",
|
||||
|
||||
packages=[
|
||||
"rust2rpm",
|
||||
"rust2rpm.core",
|
||||
],
|
||||
package_data={
|
||||
"rust2rpm": [
|
||||
"spdx_to_fedora.csv",
|
||||
"templates/*.spec",
|
||||
"templates/*.spec.inc",
|
||||
],
|
||||
},
|
||||
entry_points={
|
||||
"console_scripts": [
|
||||
"rust2rpm = rust2rpm.__main__:main",
|
||||
"cargo-inspector = rust2rpm.core.inspector:main",
|
||||
],
|
||||
},
|
||||
install_requires=[
|
||||
# rust2rpm
|
||||
"jinja2",
|
||||
"pyparsing",
|
||||
"requests",
|
||||
"tqdm",
|
||||
],
|
||||
|
||||
author="Igor Gnatenko",
|
||||
author_email="ignatenkobrain@fedoraproject.org",
|
||||
url="https://pagure.io/fedora-rust/rust2rpm",
|
||||
classifiers=[
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Operating System :: POSIX :: Linux",
|
||||
"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",
|
||||
"Topic :: Software Development :: Build Tools",
|
||||
"Topic :: System :: Software Distribution",
|
||||
"Topic :: Utilities",
|
||||
],
|
||||
)
|
||||
|
||||
if __name__ == "__main__":
|
||||
setup(**ARGS)
|
Loading…
Reference in a new issue