Skip to content

Commit

Permalink
Create a proper spec file for packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfpeterson committed Apr 22, 2020
1 parent 0cde67c commit 9f01f5b
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 8 deletions.
78 changes: 78 additions & 0 deletions finddata.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
%global srcname finddata
%global summary Find data files using ONCat
%define release 1

Summary: %{summary}
Name: python-%{srcname}
Version: 0.7.0
Release: %{release}%{?dist}
Source0: https://github.com/peterfpeterson/finddata/archive/v%{version}.tar.gz
License: MIT
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: %{_prefix}
BuildArch: noarch
Vendor: Pete Peterson <[email protected]>
Url: https://github.com/peterfpeterson/finddata

%description
Finddata uses ONCat to locate the full path of files on the NScD clusters.

%package -n %{srcname}
Summary: %{summary}
Requires: python2
Requires: python2-plotly
Requires: python2-pyoncat
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}

BuildRequires: python2-setuptools

%description -n %{srcname}
Finddata uses ONCat to locate the full path of files on the NScD clusters.

%package -n python%{python3_pkgversion}-%{srcname}
Summary: %{summary}
Requires: python%{python3_pkgversion}
Requires: python%{python3_pkgversion}-plotly
Requires: python%{python3_pkgversion}-pyoncat
Requires: bash
Requires: bash-commpletion
Requires: python%{python3_pkgversion}-argcomplete
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}

BuildRequires: python3-setuptools

%description -n python%{python3_pkgversion}-%{srcname}
Finddata uses ONCat to locate the full path of files on the NScD clusters.

%prep
%setup -n %{srcname}-%{version} -n %{srcname}-%{version}

%build
%py2_build
%py3_build

%install
%py2_install
%py3_install

# testing is somehow broken, but the package did work
#%check
#%{__python3} setup.py test
# ipywidgets is missing
# skimage is missing

%clean
rm -rf $RPM_BUILD_ROOT

%files -n %{srcname}
%doc README
%license LICENSE.txt
%{python2_sitelib}/*

%files -n python%{python3_pkgversion}-%{srcname}
%doc README
%license LICENSE.txt
%{python3_sitelib}/*
/usr/bin/finddata
/etc/bash_completion.d/finddata.bashcomplete
8 changes: 0 additions & 8 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
[bdist]
formats = rpm

[bdist_rpm]
requires = python, bash, bash-completion, python-argcomplete
build_requires = python, python-setuptools
doc_files = README

[versioneer]
VCS = git
style = pep440
Expand Down

0 comments on commit 9f01f5b

Please sign in to comment.