Skip to content

Commit

Permalink
build srpm
Browse files Browse the repository at this point in the history
  • Loading branch information
jasinner committed May 22, 2024
1 parent 1a9f156 commit f793329
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
53 changes: 53 additions & 0 deletions osidb_bindings.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
%define name osidb-bindings
%define version 3.6.0
%define release 0%{?dist}

Name: %{name}
Version: %{version}
Release: %{release}
Summary: OSIDB Python Bindings

URL: https://github.com/RedHatProductSecurity/osdib-bindings
Source0: %{name}-%{version}.tar.gz
License: MIT
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot

BuildArch: noarch
AutoReqProv: no
BuildRequires: python3-devel
BuildRequires: python3-wheel
Requires: python3-aiohttp
Requires: python3-attrs
Requires: python3-dateutil
Requires: python3-requests
Requires: python3-requests-gssapi


%description
Python Client bindings for OSIDB

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

%generate_buildrequires

%pyproject_buildrequires


%build
%pyproject_wheel

%install
%pyproject_install

%pyproject_save_files %{name}


%files -n %{name} -f %{pyproject_files}

%changelog
* Wed May 22 2024 Jason <[email protected]> - 3.6.0
- RPM packing for osidb_bindings added



13 changes: 13 additions & 0 deletions scripts/build_srpms.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

set -e


#cleanup build dirs
rm -r dist/ ~/rpmbuild/SOURCES/osidb-bindings* ~/rpmbuild/SRPMS/osidb-bindings* || true

mkdir dist
python3 setup.py clean sdist
cp dist/* ~/rpmbuild/SOURCES/
rpmbuild --undefine dist -bs "osidb_bindings.spec" --clean

4 changes: 4 additions & 0 deletions scripts/push-rpms.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

#submit SRPMs to copr
rhcopr build --nowait jshepher/newtopia-cli ~/rpmbuild/SRPMS/*

0 comments on commit f793329

Please sign in to comment.