%global forgeurl https://github.com/fsspec/universal_pathlib %global _description %{expand: Universal Pathlib is a Python library that extends the pathlib.Path API to support a variety of backend filesystems via filesystem_spec.} Name: python-universal-pathlib Version: 0.2.2 Release: %{autorelease} Summary: Pathlib api extended to use fsspec backends License: MIT URL: %forgeurl %forgemeta Source0: %forgesource BuildArch: noarch %description %_description %package -n python3-universal-pathlib Summary: %{summary} BuildRequires: python3-devel %description -n python3-universal-pathlib %_description %package doc Summary: Documentation for %{name} %description doc This package provides documentation for %{name}. %prep %forgeautosetup # Comment out to remove /usr/bin/env shebangs # Can use something similar to correct/remove /usr/bin/python shebangs also # find . -type f -name "*.py" -exec sed -i '/^#![ ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';' # see pyproject-rpm-macros documentation for more forms %generate_buildrequires export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %pyproject_buildrequires %build export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %pyproject_wheel %install export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %pyproject_install %pyproject_save_files -l upath %check export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} # skip pytests because a majority of tests require internet connectivity # check imports instead %pyproject_check_import # LICENSE/COPYING are included in the dist-info, so we do not need to # explicitly list them again %files -n python3-universal-pathlib -f %{pyproject_files} %doc README.md %files doc %doc notebooks %license LICENSE %changelog %autochangelog