rust2rpm/setup.py
Zbigniew Jędrzejewski-Szmek 73998d6adc Translate SPDX licenses to Fedora license tags, warn about "/"
"/" is deprecated everywhere, so warn about that.
Translation from SPDX is only used for fedora or epel targets.

The Fedora license list coalesces various license variants that have different
SPDX license tags into a single license tag. Most notably, this is done for the
39 BSD variants and 18 MIT variants on the Fedora good licenses list. When a
spdx→fedora mapping exists, it should always be unambiguous, because SPDX
considers any change in the license text to be a unique license, and Fedora is
more permissive in that regard.

To make a review of the translation easy, debug info is output to stdout, and
comments are inserted into the spec when some translation is required or when
there are problems with the upstream licensing.

The license list is pulled from the spdx project:
$ curl 'https://docs.google.com/spreadsheets/d/1LUJuzGKC5K2yYuAg8S-2VYbS2dmg_4IlFdpqj7n9Ghg/export?format=csv&id=1LUJuzGKC5K2yYuAg8S-2VYbS2dmg_4IlFdpqj7n9Ghg&gid=138634715' > rust2rpm/spdx_to_fedora.csv

v2:
- apply "/" replacement always

v3:
- print to stderr
- use csv.DictReader
- filter out empty license lines
2018-08-16 16:16:02 +02:00

55 lines
1.4 KiB
Python

from setuptools import setup
ARGS = dict(
name="rust2rpm",
version="5",
description="Convert Rust crates to RPM",
license="MIT",
keywords="rust cargo rpm",
packages=["rust2rpm"],
package_data={
"rust2rpm": [
"spdx_to_fedora.csv",
"templates/*.spec",
"templates/*.spec.inc",
],
},
entry_points={
"console_scripts": [
"rust2rpm = rust2rpm.__main__:main",
"cargo-inspector = rust2rpm.inspector:main",
],
},
install_requires=[
# Metadata parser
"semantic_version",
# CLI tool
"jinja2",
"requests",
"tqdm",
# Rust cfg language parser
"rustcfg",
],
author="Igor Gnatenko",
author_email="ignatenkobrain@fedoraproject.org",
url="https://pagure.io/fedora-rust/rust2rpm",
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Topic :: Software Development :: Build Tools",
"Topic :: System :: Software Distribution",
"Topic :: Utilities",
],
)
if __name__ == "__main__":
setup(**ARGS)