|
|
43c4c13 |
# https://fedoraproject.org/wiki/Packaging:DistTag?rd=Packaging/DistTag#Conditionals
|
|
|
43c4c13 |
%if 0%{?fedora} < 30
|
|
|
43c4c13 |
%global with_py2 1
|
|
|
43c4c13 |
%else
|
|
|
43c4c13 |
%global with_py2 0
|
|
|
43c4c13 |
%endif
|
|
|
b74379c |
%global srcname hdfs
|
|
|
b74379c |
%global sum HdfsCLI: API and command line interface for HDFS
|
|
|
b74379c |
|
|
|
b74379c |
Name: python-%{srcname}
|
|
|
fe8787e |
Version: 2.5.8
|
|
|
f816d36 |
Release: 6%{?dist}
|
|
|
b74379c |
Summary: %{sum}
|
|
|
b74379c |
|
|
|
b74379c |
License: MIT
|
|
|
b74379c |
URL: https://github.com/mtth/%{srcname}
|
|
|
b74379c |
Source0: https://github.com/mtth/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz
|
|
|
b74379c |
|
|
|
b74379c |
BuildArch: noarch
|
|
|
b74379c |
|
|
|
b74379c |
%global _description Python (2 and 3) bindings for the WebHDFS (and HttpFS) \
|
|
|
b74379c |
API, supporting both secure and insecure clusters. Command line interface to \
|
|
|
b74379c |
transfer files and start an interactive client shell, with aliases for \
|
|
|
b74379c |
convenient name-node URL caching. Additional functionality through optional \
|
|
|
b74379c |
extensions: Avro, to read and write Avro files directly from HDFS. data-frame, \
|
|
|
b74379c |
to load and save Pandas data-frames. Kerberos, to support Kerberos \
|
|
|
b74379c |
authenticated clusters.
|
|
|
b74379c |
|
|
|
b74379c |
%description
|
|
|
b74379c |
%{_description}
|
|
|
b74379c |
|
|
|
43c4c13 |
%if %{with_py2}
|
|
|
b74379c |
%package -n python2-%{srcname}
|
|
|
b74379c |
Summary: %{sum}
|
|
|
b74379c |
BuildRequires: python2-devel
|
|
|
b74379c |
BuildRequires: %{py2_dist setuptools}
|
|
|
b74379c |
BuildRequires: %{py2_dist six}
|
|
|
b74379c |
BuildRequires: %{py2_dist fastavro}
|
|
|
b74379c |
BuildRequires: %{py2_dist pandas}
|
|
|
b74379c |
BuildRequires: %{py2_dist requests-kerberos}
|
|
|
b74379c |
BuildRequires: %{py2_dist nose}
|
|
|
fe8787e |
BuildRequires: %{py2_dist mock}
|
|
|
b74379c |
Requires: %{py2_dist six}
|
|
|
b74379c |
Requires: %{py2_dist requests}
|
|
|
b74379c |
Requires: %{py2_dist docopt}
|
|
|
b74379c |
Requires: %{py2_dist fastavro}
|
|
|
b74379c |
Requires: %{py2_dist pandas}
|
|
|
b74379c |
Requires: %{py2_dist requests-kerberos}
|
|
|
fe8787e |
Requires: %{py2_dist mock}
|
|
|
b74379c |
|
|
|
b74379c |
%{?python_provide:%python_provide python2-%{srcname}}
|
|
|
b74379c |
|
|
|
b74379c |
%description -n python2-%{srcname}
|
|
|
b74379c |
%{_description}
|
|
|
43c4c13 |
%endif
|
|
|
b74379c |
|
|
|
b74379c |
%package -n python3-%{srcname}
|
|
|
b74379c |
Summary: %{sum}
|
|
|
b74379c |
BuildRequires: python3-devel
|
|
|
b74379c |
BuildRequires: %{py3_dist setuptools}
|
|
|
b74379c |
BuildRequires: %{py3_dist six}
|
|
|
b74379c |
BuildRequires: %{py3_dist fastavro}
|
|
|
b74379c |
BuildRequires: %{py3_dist pandas}
|
|
|
b74379c |
BuildRequires: %{py3_dist requests-kerberos}
|
|
|
b74379c |
BuildRequires: %{py3_dist nose}
|
|
|
fe8787e |
BuildRequires: %{py3_dist mock}
|
|
|
b74379c |
Requires: %{py3_dist six}
|
|
|
b74379c |
Requires: %{py3_dist requests}
|
|
|
b74379c |
Requires: %{py3_dist docopt}
|
|
|
b74379c |
Requires: %{py3_dist fastavro}
|
|
|
b74379c |
Requires: %{py3_dist pandas}
|
|
|
b74379c |
Requires: %{py3_dist requests-kerberos}
|
|
|
fe8787e |
Requires: %{py3_dist mock}
|
|
|
b74379c |
%{?python_provide:%python_provide python3-%{srcname}}
|
|
|
b74379c |
|
|
|
b74379c |
%description -n python3-%{srcname}
|
|
|
b74379c |
%{_description}
|
|
|
b74379c |
|
|
|
b74379c |
%package doc
|
|
|
b74379c |
Summary: Documentation for %{name}
|
|
|
43c4c13 |
BuildRequires: %{py3_dist sphinx}
|
|
|
b74379c |
# Should docs require the main package?
|
|
|
b74379c |
|
|
|
b74379c |
%description doc
|
|
|
b74379c |
%{_description}
|
|
|
b74379c |
|
|
|
b74379c |
%prep
|
|
|
b74379c |
%autosetup -n %{srcname}-%{version}
|
|
|
b74379c |
rm -rf *.egg-info
|
|
|
b74379c |
|
|
|
b74379c |
%build
|
|
|
43c4c13 |
%if %{with_py2}
|
|
|
b74379c |
%py2_build
|
|
|
43c4c13 |
%endif
|
|
|
b74379c |
%py3_build
|
|
|
b74379c |
|
|
|
b74379c |
pushd doc
|
|
|
43c4c13 |
PYTHONPATH=../ sphinx-build-3 . html
|
|
|
b74379c |
rm -fvr html/{.buildinfo,.doctrees}
|
|
|
b74379c |
popd
|
|
|
b74379c |
|
|
|
b74379c |
# Remove shebang from examples in doc
|
|
|
b74379c |
for example in examples/*.py; do
|
|
|
b74379c |
sed '1{\@^#!/usr/bin/env python@d}' $example > $example.new &&
|
|
|
b74379c |
touch -r $example $example.new &&
|
|
|
b74379c |
mv $example.new $example
|
|
|
b74379c |
done
|
|
|
b74379c |
|
|
|
b74379c |
%install
|
|
|
43c4c13 |
%if %{with_py2}
|
|
|
b74379c |
%py2_install
|
|
|
43c4c13 |
%endif
|
|
|
b74379c |
%py3_install
|
|
|
b74379c |
|
|
|
b74379c |
# Remove shebang from libraries
|
|
|
b74379c |
# probably easier to use find, but the wiki suggests a for loop
|
|
|
43c4c13 |
%if %{with_py2}
|
|
|
b74379c |
for lib in %{buildroot}%{python2_sitelib}/%{srcname}/*.py %{buildroot}%{python2_sitelib}/%{srcname}/ext/*.py %{buildroot}%{python2_sitelib}/%{srcname}/ext/avro/*.py;
|
|
|
b74379c |
do
|
|
|
b74379c |
echo "Working on $lib"
|
|
|
b74379c |
sed '1{\@^#!/usr/bin/env python@d}' $lib > $lib.new &&
|
|
|
b74379c |
touch -r $lib $lib.new &&
|
|
|
b74379c |
mv $lib.new $lib
|
|
|
b74379c |
done
|
|
|
43c4c13 |
%endif
|
|
|
b74379c |
|
|
|
b74379c |
for lib in %{buildroot}%{python3_sitelib}/%{srcname}/*.py %{buildroot}%{python3_sitelib}/%{srcname}/ext/*.py %{buildroot}%{python3_sitelib}/%{srcname}/ext/avro/*.py;
|
|
|
b74379c |
do
|
|
|
b74379c |
echo "Working on $lib"
|
|
|
b74379c |
sed '1{\@^#!/usr/bin/env python@d}' $lib > $lib.new &&
|
|
|
b74379c |
touch -r $lib $lib.new &&
|
|
|
b74379c |
mv $lib.new $lib
|
|
|
b74379c |
done
|
|
|
b74379c |
|
|
|
b74379c |
# Ignore tests - require a hadoop cluster setup
|
|
|
b74379c |
# https://github.com/mtth/hdfs/blob/master/.travis.yml#L10
|
|
|
b74379c |
|
|
|
43c4c13 |
%if %{with_py2}
|
|
|
b74379c |
%files -n python2-%{srcname}
|
|
|
b74379c |
%license LICENSE
|
|
|
b74379c |
%{python2_sitelib}/%{srcname}-%{version}-py?.?.egg-info
|
|
|
b74379c |
%{python2_sitelib}/%{srcname}/
|
|
|
43c4c13 |
%endif
|
|
|
b74379c |
|
|
|
b74379c |
%files -n python3-%{srcname}
|
|
|
b74379c |
%license LICENSE
|
|
|
0e51a87 |
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info
|
|
|
b74379c |
%{python3_sitelib}/%{srcname}/
|
|
|
b74379c |
%{_bindir}/%{srcname}*
|
|
|
b74379c |
|
|
|
b74379c |
%files doc
|
|
|
03e5753 |
%doc examples AUTHORS CHANGES README.md doc/html
|
|
|
b74379c |
%license LICENSE
|
|
|
b74379c |
|
|
|
b74379c |
%changelog
|
|
|
f816d36 |
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.8-6
|
|
|
f816d36 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
f816d36 |
|
|
|
09c0199 |
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2.5.8-5
|
|
|
09c0199 |
- Rebuilt for Python 3.9
|
|
|
09c0199 |
|
|
|
21aa78c |
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.8-4
|
|
|
21aa78c |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
21aa78c |
|
|
|
62fa09e |
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.5.8-3
|
|
|
62fa09e |
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
|
|
62fa09e |
|
|
|
abf90a8 |
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2.5.8-2
|
|
|
abf90a8 |
- Rebuilt for Python 3.8
|
|
|
abf90a8 |
|
|
|
fe8787e |
* Thu Aug 01 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.5.8-1
|
|
|
fe8787e |
- Update to new version
|
|
|
fe8787e |
|
|
|
fcab39b |
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.6-2
|
|
|
fcab39b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
fcab39b |
|
|
|
b0709ab |
* Wed Jun 19 2019 Luis Bazan <lbazan@fedoraproject.org> - 2.5.6-1
|
|
|
b0709ab |
- New upstream version
|
|
|
b0709ab |
|
|
|
f046157 |
* Wed Jun 12 2019 Luis Bazan <lbazan@fedoraproject.org> - 2.5.4-1
|
|
|
f046157 |
- New upstream version
|
|
|
f046157 |
|
|
|
03e5753 |
* Mon May 27 2019 Luis Bazan <lbazan@fedoraproject.org> - 2.5.2-2
|
|
|
03e5753 |
- Add buildrequire
|
|
|
03e5753 |
- Fix readme extension
|
|
|
03e5753 |
|
|
|
1a6bfd1 |
* Mon May 27 2019 Luis Bazan <lbazan@fedoraproject.org> - 2.5.2-1
|
|
|
1a6bfd1 |
- New upstream version
|
|
|
1a6bfd1 |
|
|
|
0afd5c9 |
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-8
|
|
|
0afd5c9 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
0afd5c9 |
|
|
|
43c4c13 |
* Thu Nov 08 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.1.0-7
|
|
|
43c4c13 |
- Disable py2 on F30+
|
|
|
43c4c13 |
- Use py3 sphinx for document generation
|
|
|
43c4c13 |
|
|
|
7aa9569 |
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-6
|
|
|
7aa9569 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
7aa9569 |
|
|
|
9bbe766 |
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 2.1.0-5
|
|
|
9bbe766 |
- Rebuilt for Python 3.7
|
|
|
9bbe766 |
|
|
|
0a911ab |
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 2.1.0-4
|
|
|
0a911ab |
- Rebuilt for Python 3.7
|
|
|
0a911ab |
|
|
|
c5e9df9 |
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-3
|
|
|
c5e9df9 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
c5e9df9 |
|
|
|
b74379c |
* Tue Jan 23 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.1.0-2
|
|
|
b74379c |
- Fix doc generation
|
|
|
b74379c |
- Fix summary macro
|
|
|
b74379c |
- List binary files
|
|
|
b74379c |
|
|
|
b74379c |
* Mon Jan 15 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.1.0-1
|
|
|
b74379c |
- Initial build
|