## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 5; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global forgeurl https://github.com/mtth/hdfs # Sphinx-generated HTML documentation is not suitable for packaging; see # https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion. # # We can generate PDF documentation as a lesser substitute. %bcond doc_pdf 1 Name: python-hdfs Version: 2.7.3 Release: %autorelease Summary: API and command line interface for HDFS %forgemeta # SPDX License: MIT URL: %forgeurl Source0: %forgesource # Downstream man pages in groff_man(7) format. These were written for Fedora # based on the tools’ --help output and should be updated if the command-line # interface changes. Source1: hdfscli.1 Source2: hdfscli-avro.1 BuildArch: noarch # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval # # Additionally, fastavro (required by some extras metapackages) is not # available on 32-bit architectures. Excluding these allows us to stop # conditionalizing those architectures. ExcludeArch: %{ix86} BuildRequires: python3-devel # Extra dependencies for documentation %if %{with doc_pdf} BuildRequires: make BuildRequires: %{py3_dist sphinx} BuildRequires: python3-sphinx-latex BuildRequires: latexmk %endif %global _description %{expand: %{summary}. Features: • Python bindings for the WebHDFS (and HttpFS) API, supporting both secure and insecure clusters. • Command line interface to transfer files and start an interactive client shell, with aliases for convenient namenode URL caching. • Additional functionality through optional extensions: ○ avro, to read and write Avro files directly from HDFS. ○ dataframe, to load and save Pandas dataframes. ○ kerberos, to support Kerberos authenticated clusters.} %description %{_description} %package -n python3-hdfs Summary: %{summary} %description -n python3-hdfs %{_description} # We manually write out the python3-hdfs+avro subpackage so that it can contain # the hdfscli-avro CLI entry point, and so that its summary and description can # be tweaked to reflect this. The definition is based on: # # rpm -E '%%pyproject_extras_subpkg -n python3-hdfs avro' %package -n python3-hdfs+avro Summary: Package for python3-hdfs: avro extras Requires: python3-hdfs = %{version}-%{release} %description -n python3-hdfs+avro This is a package bringing in avro extras requires for python3-hdfs. It makes sure the dependencies are installed. It also includes the avro-specific command-line tool, hdfscli-avro. %pyproject_extras_subpkg -n python3-hdfs dataframe kerberos %package doc Summary: Documentation and examples for %{name} %description doc %{_description} %prep %forgeautosetup -p1 # Remove shebangs from non-script sources. The find-then-modify pattern keeps # us from discarding mtimes on sources that do not need modification. find . -type f ! -perm /0111 \ -exec gawk '/^#!/ { print FILENAME }; { nextfile }' '{}' '+' | xargs -r -t sed -r -i '1{/^#!/d}' %generate_buildrequires %pyproject_buildrequires -x avro,dataframe,kerberos %build %pyproject_wheel %if %{with doc_pdf} PYTHONPATH="${PWD}" sphinx-build -b latex doc _latex -j%{?_smp_build_ncpus} %make_build -C _latex LATEXMKOPTS='-quiet' %endif %install %pyproject_install %pyproject_save_files -l hdfs install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 %{SOURCE1} %{SOURCE2} %check # Ignore upstream tests - require a hadoop cluster setup # https://github.com/mtth/hdfs/blob/master/.travis.yml#L10 %pyproject_check_import %files -n python3-hdfs -f %{pyproject_files} %{_bindir}/hdfscli %{_mandir}/man1/hdfscli.1* %files -n python3-hdfs+avro %ghost %{python3_sitelib}/*.dist-info %{_bindir}/hdfscli-avro %{_mandir}/man1/hdfscli-avro.1* %files doc %license LICENSE %doc AUTHORS %doc CHANGES %doc README.md %if %{with doc_pdf} %doc _latex/hdfs.pdf %endif %doc examples %changelog ## START: Generated by rpmautospec * Fri Jul 19 2024 Fedora Release Engineering - 2.7.3-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Sun Jun 09 2024 Python Maint - 2.7.3-4 - Rebuilt for Python 3.13 * Wed Mar 13 2024 Sandro - 2.7.3-3 - Fix Packit config * Fri Feb 23 2024 Sandro - 2.7.3-2 - Add Packit config * Fri Feb 23 2024 Sandro - 2.7.3-1 - Update to 2.7.3 (RHBZ#2244149) - Drop patches (merged upstream) * Fri Feb 23 2024 Sandro - 2.7.2-7 - Use forge macros * Fri Jan 26 2024 Fedora Release Engineering - 2.7.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 2.7.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Wed Jan 03 2024 Benjamin A. Beasley - 2.7.2-4 - Assert that the .dist-info directory contains a license file * Sat Aug 26 2023 Benjamin A. Beasley - 2.7.2-3 - Adjust Sphinx copyright strings (fix RHBZ#2232580) * Sat Aug 12 2023 Benjamin A. Beasley - 2.7.2-2 - Improved Python 3.12 fix, without zombie-imp * Wed Aug 09 2023 Benjamin A. Beasley - 2.7.2-1 - Update to 2.7.2 * Wed Aug 09 2023 Benjamin A. Beasley - 2.7.1-1 - Update to 2.7.1 (close RHBZ#2230346) - This release was intended to fix Python 3.12 support, but didn’t; see https://github.com/mtth/hdfs/pull/192#issuecomment-1671591466. * Wed Aug 09 2023 Benjamin A. Beasley - 2.6.0-16 - Confirm the License is SPDX MIT * Wed Aug 09 2023 Benjamin A. Beasley - 2.6.0-15 - Build LaTeX without as much verbose output * Wed Aug 09 2023 Benjamin A. Beasley - 2.6.0-14 - Do not assume _smp_mflags is -j# * Wed Aug 09 2023 Benjamin A. Beasley - 2.6.0-13 - Install man pages without copying them to the build directory first * Wed Aug 09 2023 Benjamin A. Beasley - 2.6.0-12 - Drop i686 support (leaf package) * Wed Aug 09 2023 Benjamin A. Beasley - 2.6.0-11 - Use new (rpm 4.17.1+) bcond style * Fri Jul 21 2023 Fedora Release Engineering - 2.6.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Wed Jun 14 2023 Python Maint - 2.6.0-6 - Rebuilt for Python 3.12 * Fri Jan 20 2023 Fedora Release Engineering - 2.6.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 2.6.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Tue Jun 14 2022 Python Maint - 2.6.0-3 - Rebuilt for Python 3.11 * Fri Jan 21 2022 Fedora Release Engineering - 2.6.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Mon Nov 08 2021 Benjamin A. Beasley - 2.6.0-1 - Update to 2.6.0 (close RHBZ#2020978) * Fri Oct 29 2021 Benjamin A. Beasley - 2.5.8-12 - Use the new %%pyproject_check_import macro * Wed Oct 27 2021 Benjamin A. Beasley - 2.5.8-11 - Fix a typo in a comment in the spec file * Sun Oct 10 2021 Benjamin A. Beasley - 2.5.8-10 - Fully modernize the packaging - Switch to “new guidelines” / pyproject-rpm-macros - Drop conditionals for Python 2 on obsolete Fedora releases - Rely on Python dependency generator (no manual Requires) - Build PDF instead of HTML documentation due to guideline issues - Drop dependencies on deprecated nose and mock - Properly handle extras metapackages and dependency on unported python-fastavro for 32-bit architectures; move the hdfscli-avro entry point into the new python3-hdfs+avro package - Add man pages for command-line tools * Fri Jul 23 2021 Fedora Release Engineering - 2.5.8-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 2.5.8-8 - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 2.5.8-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Jul 29 2020 Fedora Release Engineering - 2.5.8-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue May 26 2020 Miro Hrončok - 2.5.8-5 - Rebuilt for Python 3.9 * Thu Jan 30 2020 Fedora Release Engineering - 2.5.8-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Oct 03 2019 Miro Hrončok - 2.5.8-3 - Rebuilt for Python 3.8.0rc1 (#1748018) * Mon Aug 19 2019 Miro Hrončok - 2.5.8-2 - Rebuilt for Python 3.8 * Thu Aug 01 2019 Ankur Sinha - 2.5.8-1 - Update to new version * Fri Jul 26 2019 Fedora Release Engineering - 2.5.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Wed Jun 19 2019 Luis Bazan - 2.5.6-1 - New upstream version * Wed Jun 12 2019 Luis Bazan - 2.5.4-1 - New upstream version * Mon May 27 2019 Luis Bazan - 2.5.2-2 - Add buildrequire - Fix readme extension * Mon May 27 2019 Luis Bazan - 2.5.2-1 - New upstream version * Sat Feb 02 2019 Fedora Release Engineering - 2.1.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Thu Nov 08 2018 Ankur Sinha - 2.1.0-7 - Disable py2 on F30+ - Use py3 sphinx for document generation * Sat Jul 14 2018 Fedora Release Engineering - 2.1.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Tue Jun 19 2018 Miro Hrončok - 2.1.0-5 - Rebuilt for Python 3.7 * Tue Jun 19 2018 Miro Hrončok - 2.1.0-4 - Rebuilt for Python 3.7 * Fri Feb 09 2018 Fedora Release Engineering - 2.1.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Tue Jan 23 2018 Ankur Sinha - 2.1.0-2 - Fix doc generation - Fix summary macro - List binary files * Mon Jan 15 2018 Ankur Sinha - 0.1.0-1 - Initial build ## END: Generated by rpmautospec