Name: python-mac-vendor-lookup Version: 0.1.12 Release: 0.01%{?dist} Summary: Version-bump your software with a single command! # Check if the automatically generated License and its spelling is correct for Fedora # https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/ License: GPL-3.0-only URL: https://github.com/peritus/mac-vendor-lookup #Source: %%{pypi_source mac-vendor-lookup} # 0.1.12 is not tagged. Source: https://github.com/bauerj/mac_vendor_lookup/archive/90dbea.tar.gz # PYTHONPATH=/path/to/this/module/ python -c "from mac_vendor_lookup import MacLookup; MacLookup().update_vendors()" && cp ~/.cache/mac-vendors.txt . # Create this file with curl -L -o mac-vendors.txt http://standards-oui.ieee.org/oui.txt Source1: mac-vendors.txt BuildArch: noarch BuildRequires: python3-devel # Fill in the actual package description to submit package to Fedora %global _description %{expand: This is package 'mac-vendor-lookup' generated automatically by pyp2spec.} %description %_description %package -n python3-mac-vendor-lookup Summary: %{summary} %description -n python3-mac-vendor-lookup %_description %prep %autosetup -p1 -n mac_vendor_lookup-90dbea48f8a9d567b5f9039ebd151ddfe7d12a19 cp "%{SOURCE1}" . sed -i -e 's/sys.prefix + "\(\/cache\/mac-vendors.txt"\)/"\%{_sysconfdir}\1/' mac_vendor_lookup.py %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install # fix badly hard-coded path in mac-vendor-lookup sed -i -e 's/sys.prefix + "\(\/cache\/mac-vendors.txt"\)/"\%{_sysconfdir}\1/' %{buildroot}%{python3_sitelib}/mac_vendor_lookup.py #mkdir -p %{buildroot}%{_sysconfdir}/ #mv %{buildroot}{/usr/cache,%{_sysconfdir}}/mac-vendors.txt # For official Fedora packages, including files with '*' +auto is not allowed # Replace it with a list of relevant Python modules/globs and list extra files in %%files %pyproject_save_files '*' +auto %check #ValueError: No modules to check were left #%%pyproject_check_import %files -n python3-mac-vendor-lookup -f %{pyproject_files} %changelog * Thu Feb 8 2024 Brian J. Murrell - 1.1.12-0.01 - Initial creation - Use GH tarball release as there is no sdist at PyPI - Fix hard-coding of mac-vendors.txt in /usr/cache - Move to /etc/