diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..90b50e9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/license-expression-0.999.tar.gz diff --git a/python-license-expression.spec b/python-license-expression.spec new file mode 100644 index 0000000..2f93cbc --- /dev/null +++ b/python-license-expression.spec @@ -0,0 +1,61 @@ +%global pypi_name license-expression + +Name: python-%{pypi_name} +Version: 0.999 +Release: 1%{?dist} +Summary: Library to parse, compare, simplify and normalize license expressions +# `irc-notify.py` in the tarball is licensed under GPL, but not re-distributed +License: ASL 2.0 +URL: https://github.com/nexB/license-expression/ +Source0: %pypi_source + +BuildArch: noarch + +%global _description \ +This module defines a mini language to parse, validate, simplify, normalize and\ +compare license expressions using a boolean logic engine.\ +\ +This supports SPDX license expressions and also accepts other license naming\ +conventions and license identifiers aliases to resolve and normalize licenses.\ +\ +Using boolean logic, license expressions can be tested for equality,\ +containment, equivalence and can be normalized or simplified. + +%description %{_description} + +%package -n python%{python3_pkgversion}-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}} +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools +BuildRequires: %{py3_dist pytest} +BuildRequires: %{py3_dist boolean.py} + +%description -n python%{python3_pkgversion}-%{pypi_name} %{_description} + +Python 3 version. + +%prep +%autosetup -n %{pypi_name}-%{version} +# Remove bundled egg-info +rm -r src/*.egg-info/ +rm PKG-INFO + +%build +%py3_build + +%install +%py3_install + +%check +PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} -v + +%files -n python%{python3_pkgversion}-%{pypi_name} +%license apache-2.0.LICENSE NOTICE +%doc README.rst +%{python3_sitelib}/license_expression*.egg-info/ +%{python3_sitelib}/license_expression/ + +%changelog +* Mon Sep 02 2019 Carmen Bianca Bakker - 0.999-1 +- New package. diff --git a/sources b/sources new file mode 100644 index 0000000..039d287 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (license-expression-0.999.tar.gz) = 3c7dd1058f2acf3dc8f92a087eb38c5b05170bcfe1cc7c6915c55bd8d4e2faa8fd3b1955e5641cc801e65285971139f16e056dc16125072aa786245dfc332387