-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add patchfile and do lots of changes in specfile
- Loading branch information
1 parent
8a626db
commit 710009f
Showing
3 changed files
with
83 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
%global srcname finddata | ||
%global summary Find data files using ONCat | ||
%define release 1 | ||
# default python3=python3.9 on rhel9 which is too old | ||
%define python3_pkgversion 3.11 | ||
|
||
Summary: %{summary} | ||
Name: python-%{srcname} | ||
|
@@ -11,9 +13,12 @@ License: MIT | |
Group: Development/Libraries | ||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot | ||
Prefix: %{_prefix} | ||
BuildArch: noarch / BuildRequires: gcc | ||
BuildArch: noarch | ||
Vendor: Pete Peterson <[email protected]> | ||
Url: https://github.com/neutrons/finddata | ||
Obsoletes: python3-finddata | ||
|
||
Patch1: finddata-pyproject.patch | ||
|
||
%description | ||
Finddata uses ONCat to locate the full path of files on the NScD clusters. | ||
|
@@ -24,41 +29,40 @@ Requires: python%{python3_pkgversion} | |
Requires: python%{python3_pkgversion}-urllib3 | ||
Requires: bash | ||
Requires: bash-completion | ||
Requires: python%{python3_pkgversion}-argcomplete | ||
#Requires: python%{python3_pkgversion}-argcomplete | ||
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} | ||
|
||
BuildRequires: python3-devel | ||
BuildRequires: python3-tomli | ||
BuildRequires: python3-wheel | ||
BuildRequires: python%{python3_pkgversion}-devel | ||
BuildRequires: python%{python3_pkgversion}-wheel | ||
BuildRequires: python%{python3_pkgversion}-pip | ||
|
||
%description -n python%{python3_pkgversion}-%{srcname} | ||
Finddata uses ONCat to locate the full path of files on the NScD clusters. | ||
|
||
# unpack tarball and apply patchfile - add -v to see individual commands | ||
%prep | ||
%autosetup -p1 -n %{srcname}-%{version} | ||
|
||
%generate_buildrequires | ||
%pyproject_buildrequires | ||
%autosetup -p1 | ||
|
||
%build | ||
%pyproject_wheel | ||
|
||
%install | ||
%pyproject_install | ||
%{__mkdir} -p %{buildroot}/etc/bash_completion.d/ | ||
%{__install} -m 644 finddata.bashcomplete %{buildroot}/etc/bash_completion.d/ | ||
%{__mkdir} -p %{buildroot}%{_bindir}/ | ||
# automatically scan files to install | ||
%pyproject_save_files finddata | ||
# install bash completions | ||
%{__mkdir} -p %{buildroot}%{_sysconfdir}/bash_completion.d/ | ||
%{__install} -m 644 finddata.bashcomplete %{buildroot}%{_sysconfdir}/bash_completion.d/ | ||
|
||
# there are no tests | ||
#check | ||
#tox | ||
# there are no tests - check that top level module can be imported | ||
%check | ||
%pyproject_check_import -t | ||
|
||
%clean | ||
rm -rf $RPM_BUILD_ROOT | ||
|
||
%files -n python%{python3_pkgversion}-%{srcname} | ||
%files -n python%{python3_pkgversion}-%{srcname} -f %{pyproject_files} | ||
%doc README.md | ||
%license LICENSE | ||
%{python3_sitelib}/* | ||
%{_bindir}/finddata | ||
/etc/bash_completion.d/finddata.bashcomplete | ||
%{_sysconfdir}/bash_completion.d/finddata.bashcomplete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
diff --git a/pyproject.toml b/pyproject.toml | ||
index ac7ebfb..adf8c09 100644 | ||
--- a/pyproject.toml | ||
+++ b/pyproject.toml | ||
@@ -1,8 +1,7 @@ | ||
[project] | ||
name = "finddata" | ||
description = "A program to find data files using ONCat" | ||
-dynamic = ["version"] | ||
-#version = "0.10.0" | ||
+version = "0.10.0" | ||
#requires-python = ">=3.10" | ||
dependencies = [ | ||
# list all runtime dependencies here | ||
@@ -23,26 +22,6 @@ requires = [ | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
-[tool.versioningit.vcs] | ||
-method = "git" | ||
-default-tag = "0.0.1" | ||
- | ||
-[tool.versioningit.next-version] | ||
-method = "minor" | ||
- | ||
-[tool.versioningit.format] | ||
-distance = "{next_version}.dev{distance}" | ||
-dirty = "{version}+d{build_date:%Y%m%d}" | ||
-distance-dirty = "{next_version}.dev{distance}+d{build_date:%Y%m%d}" | ||
- | ||
-[tool.versioningit.write] | ||
-file = "src/finddata/_version.py" | ||
- | ||
-[tool.versioningit.onbuild] | ||
-source-file = "src/finddata/_version.py" | ||
-build-file = "finddata/_version.py" | ||
-replacement = "{next_version}" | ||
- | ||
[tool.setuptools.packages.find] | ||
where = ["src"] | ||
exclude = ["tests*", "scripts*", "docs*", "notebooks*"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters