diff --git a/data/projects.ini b/data/projects.ini index bdd3495b..763ecfee 100644 --- a/data/projects.ini +++ b/data/projects.ini @@ -1740,6 +1740,7 @@ dpkg_build_dependencies: flit build_system: flit dpkg_name: python-pyparsing dpkg_template_install_python3: python3-pyparsing.install +rpm_build_dependencies: python3-flit-core rpm_template_spec: pyparsing.spec maintainer: Paul McGuire homepage_url: https://pyparsing-docs.readthedocs.io/en/latest diff --git a/data/rpm_templates/pyparsing.spec b/data/rpm_templates/pyparsing.spec index 1dd7a2af..5a1b2e96 100644 --- a/data/rpm_templates/pyparsing.spec +++ b/data/rpm_templates/pyparsing.spec @@ -2,19 +2,16 @@ %define version {version} %define release 1 -Summary: Python parsing module Name: %{{name}} Version: %{{version}} Release: %{{release}} -Source0: %{{name}}-%{{version}}.tar.gz License: MIT License -Group: Development/Libraries -BuildRoot: %{{_tmppath}}/%{{name}}-%{{version}}-%{{release}}-buildroot -Prefix: %{{_prefix}} -BuildArch: noarch -Vendor: Paul McGuire +Summary: Python parsing module Url: https://github.com/pyparsing/pyparsing/ -BuildRequires: python3-devel, python3-setuptools +Vendor: Paul McGuire +Source0: %{{name}}-%{{version}}.tar.gz +BuildArch: noarch +BuildRequires: python3-devel, python3-flit-core, python3-setuptools %description The parsing module is an alternative approach to creating @@ -34,26 +31,23 @@ of classes that client code uses to construct the grammar directly in Python code. %prep -%autosetup -n %{{name}}-%{{version}} +%autosetup -p1 -n %{{name}}-%{{version}} + +# This will try to include project.optional-dependencies +# %generate_buildrequires +# %pyproject_buildrequires -t %build -%py3_build +%pyproject_wheel %install -%py3_install -rm -rf %{{buildroot}}/usr/lib/python*/site-packages/*.egg-info/requires.txt -rm -rf %{{buildroot}}/usr/share/doc/%{{name}}/ - -%clean -rm -rf %{{buildroot}} +%pyproject_install %files -n python3-%{{name}} %license LICENSE %doc CHANGES README.rst %{{python3_sitelib}}/pyparsing -%{{python3_sitelib}}/pyparsing*.egg-info - -%exclude %{{python3_sitelib}}/__pycache__/ +%{{python3_sitelib}}/pyparsing*.dist-info %changelog * {date_time} log2timeline development team {version}-1 diff --git a/data/rpm_templates/xattr.spec b/data/rpm_templates/xattr.spec index 607b21d2..15a27885 100644 --- a/data/rpm_templates/xattr.spec +++ b/data/rpm_templates/xattr.spec @@ -10,8 +10,6 @@ License: MIT License Vendor: Bob Ippolito Url: http://github.com/xattr/xattr Source0: %{{name}}-%{{version}}.tar.gz -Group: Development/Libraries -BuildRoot: %{{_tmppath}}/%{{name}}-%{{version}}-%{{release}}-buildroot BuildRequires: gcc, python3-cffi, python3-devel, python3-pip, python3-setuptools, python3-tox-current-env, python3-wheel %description diff --git a/l2tdevtools/build_helpers/factory.py b/l2tdevtools/build_helpers/factory.py index 9f7c3bee..4472c82f 100644 --- a/l2tdevtools/build_helpers/factory.py +++ b/l2tdevtools/build_helpers/factory.py @@ -19,7 +19,11 @@ class BuildHelperFactory(object): 'wheel': wheel.ConfigureMakeWheelBuildHelper, } + # Note that the rpm and srpm setup.py build helpers are used to build + # projects that use flit. _FLIT_BUILD_HELPER_CLASSES = { + 'rpm': rpm.SetupPyRPMBuildHelper, + 'srpm': rpm.SetupPySRPMBuildHelper, 'wheel': wheel.FlitWheelBuildHelper, }