Skip to content

Commit

Permalink
Changes for building fakeredis, Flor, pyparsing and xattr rpm
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Mar 3, 2024
1 parent bb4f4bb commit f6884da
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 21 deletions.
1 change: 1 addition & 0 deletions data/projects.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
homepage_url: https://pyparsing-docs.readthedocs.io/en/latest
Expand Down
32 changes: 13 additions & 19 deletions data/rpm_templates/pyparsing.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
Summary: Python parsing module
Url: https://github.com/pyparsing/pyparsing/
BuildRequires: python3-devel, python3-setuptools
Vendor: Paul McGuire <[email protected]>
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
Expand All @@ -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 <[email protected]> {version}-1
Expand Down
2 changes: 0 additions & 2 deletions data/rpm_templates/xattr.spec
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ License: MIT License
Vendor: Bob Ippolito <[email protected]>
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
Expand Down
4 changes: 4 additions & 0 deletions l2tdevtools/build_helpers/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand Down

0 comments on commit f6884da

Please sign in to comment.