Skip to content

Commit

Permalink
added pyauditor RPM
Browse files Browse the repository at this point in the history
  • Loading branch information
dirksammel committed Feb 12, 2025
1 parent daf7252 commit 6dd62de
Show file tree
Hide file tree
Showing 5 changed files with 150 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ jobs:
build-pyauditor-source:
uses: ./.github/workflows/build_pyauditor_source.yml

build-pyauditor-rpm:
needs: build-pyauditor-source
uses: ./.github/workflows/build_pyauditor_rpm.yml

test-pyauditor-source:
needs: [build-pyauditor-source, prepare-input-parameters]
uses: ./.github/workflows/test_pyauditor_source.yml
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/build_pyauditor_rpm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: build-pyauditor-rpm

on:
workflow_call:

jobs:
build-pyauditor-rpm:
runs-on: ubuntu-latest
container: almalinux:9
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Download pyauditor source
uses: actions/download-artifact@v4
with:
name: pyauditor-wheels-source

- name: Install build dependencies
run: |
dnf install -y 'dnf-command(config-manager)'
dnf config-manager --set-enabled crb
dnf install -y epel-release
dnf install -y rpm-build rpmdevtools gcc make pip python3-devel pyproject-rpm-macros python3-tomli
sudo pip install --upgrade pip
sudo pip install maturin
- name: Set up RPM build environment
run: |
rpmdev-setuptree
- name: Copy spec file and sources
run: |
cp rpm/python-auditor.spec ~/rpmbuild/SPECS/
cp *.gz ~/rpmbuild/SOURCES/
- name: Build RPM
run: |
rpmbuild -ba ~/rpmbuild/SPECS/python-auditor.spec
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Security

### Added
- RPMs: Added RPM for pyauditor ([@dirksammel](https://github.com/dirksammel))

### Changed
- Dependencies: Update black from 24.10.0 to 25.1.0 ([@dirksammel](https://github.com/dirksammel))
Expand Down
53 changes: 53 additions & 0 deletions rpm/python-auditor.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
Name: python-auditor
Version: 0.7.0
Release: %autorelease
# Fill in the actual package summary to submit package to Fedora
Summary: Python interface to AuditorClient

# Check if the automatically generated License and its spelling is correct for Fedora
# https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/
License: MIT OR Apache-2.0
URL: https://alu-schumacher.github.io/AUDITOR/
Source: %{pypi_source python_auditor}

BuildRequires: python3-devel
BuildRequires: gcc

# Fill in the actual package description to submit package to Fedora
%global _description %{expand:
This is package 'python-auditor' generated automatically by pyp2spec.}

%description %_description

%package -n python3-python-auditor
Summary: %{summary}

%description -n python3-python-auditor %_description


%prep
%autosetup -p1 -n python_auditor-%{version}

# %generate_buildrequires
# %pyproject_buildrequires


%build
%pyproject_wheel


%install
%pyproject_install
# Add top-level Python module names here as arguments, you can use globs
%pyproject_save_files pyauditor


%check
%pyproject_check_import


%files -n python3-python-auditor -f %{pyproject_files}


%changelog
%autochangelog
53 changes: 53 additions & 0 deletions rpm/python-maturin.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
Name: python-maturin
Version: 1.8.2
Release: %autorelease
# Fill in the actual package summary to submit package to Fedora
Summary: Build and publish crates with pyo3, cffi and uniffi bindings as well as rust binaries as python packages

# Check if the automatically generated License and its spelling is correct for Fedora
# https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/
License: MIT OR Apache-2.0
URL: https://github.com/pyo3/maturin
Source: %{pypi_source maturin}

BuildArch: noarch
BuildRequires: python3-devel


# Fill in the actual package description to submit package to Fedora
%global _description %{expand:
This is package 'maturin' generated automatically by pyp2spec.}

%description %_description

%package -n python3-maturin
Summary: %{summary}

%description -n python3-maturin %_description

%prep
%autosetup -p1 -n maturin-%{version}

%generate_buildrequires
%pyproject_buildrequires


%build
%pyproject_wheel


%install
%pyproject_install
# Add top-level Python module names here as arguments, you can use globs
%pyproject_save_files maturin


%check
%pyproject_check_import


%files -n python3-maturin -f %{pyproject_files}


%changelog
%autochangelog

0 comments on commit 6dd62de

Please sign in to comment.