Name: python-openstep-plist Version: 0.4.0 Release: %autorelease Summary: ASCII plist parser written in Cython # The entire source is MIT, except vendor/msinttypes/stdint.h, which is # BSD-3-Clause, but which is removed in %%prep and does not contribute to the # licenses of the binary RPMs. License: MIT URL: https://github.com/fonttools/openstep-plist Source: %{pypi_source openstep_plist} # Add an empty [tool.setuptools_scm] section to pyproject.toml # https://github.com/fonttools/openstep-plist/pull/30 # # Fixes: # # KeyError: 'setuptools_scm' when building the package # https://github.com/fonttools/openstep-plist/issues/29 # # (Note that this was just a warning; the package builds without the patch.) Patch: %{url}/pull/30.patch # Do not distribute Cython-generated C++ sources in binary wheels # https://github.com/fonttools/openstep-plist/pull/31 Patch: %{url}/pull/31.patch BuildRequires: python3-devel BuildRequires: gcc-c++ %global common_description %{expand: A parser for the "old style" OpenStep property list format (also known as ASCII plist), written in Cython.} %description %{common_description} %package -n python3-openstep-plist Summary: %{summary} %description -n python3-openstep-plist %{common_description} %prep %autosetup -n openstep_plist-%{version} # Remove Cythonized C++ sources: # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_using_cython find . -type f -exec grep -FrinIl 'Generated by Cython' '{}' '+' | xargs -r -t rm -v # This is not executable when installed in site-packages, so we remove the # unnecessary shebang; python3 -m openstep_plist still works. sed -r -i '1{/^#!/d}' src/openstep_plist/__main__.py # Vendored header vendor/msinttypes/stdint.h has an allowed license but is only # needed on Windows: prove that we do not use it by removing it. rm -rv vendor/ # Not yet packaged: python-pytest-cython sed -r -i 's/^([[:blank:]]*)(pytest-cython)\b/\1# \2/' tox.ini %generate_buildrequires %pyproject_buildrequires -t %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l openstep_plist %check %tox -e %{default_toxenv}-nocov -- -- -v %files -n python3-openstep-plist -f %{pyproject_files} %doc README.md %changelog %autochangelog