# things to remove from pyproject.tom and therefore bundle # i.e. #%%global bundle cryptography|foo|bar Name: python-homeassistant Version: 2024.6.4 Release: 1%{?dist} Summary: Open-source home automation platform running on Python 3. # Check if the automatically generated License and its spelling is correct for Fedora # https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/ License: Apache-2.0 URL: https://www.home-assistant.io/ Source0: %{pypi_source homeassistant} BuildArch: noarch %if "%{?bundle}" != "" BuildRequires: python3-pip %endif BuildRequires: systemd %{?systemd_requires} # Fill in the actual package description to submit package to Fedora %global _description %{expand: This is package 'homeassistant' generated automatically by pyp2spec.} %description %_description %package -n python3-homeassistant Summary: %{summary} Provides: homeassistant %description -n python3-homeassistant %_description %prep %autosetup -p1 -n homeassistant-%{version} # atomicwrites is provided by fedora sed -i -e 's/\(setuptools\)==[0-9\.]*/\1>=67.7.2/' \ -e 's/\(wheel\)~=[0-9\.]*/\1>=0.40.0/' \ -e 's/\(ciso8601\)=\(=2\.3\.1"\)/\1>\2/' \ -e 's/\(Pillow\)=\(=10\.2\.0"\)/\1>\2/' \ -e 's/\(voluptuous\)=\(=0\.13\.1"\)/\1>\2/' \ -e 's/\(astral\)=\(=2\.2"\)/\1>\2/' \ -e 's/\(SQLAlchemy\)=\(=2\.0\.29"\)/\1>\2/' \ -e 's/\(atomicwrites\)-homeassistant/\1/' pyproject.toml %generate_buildrequires %if "%{?bundle}" != "" cp -a pyproject.toml{,.bak} # things we are going to bundle sed -i -E -e '/(%{?bundle})[<=>]=?/d' pyproject.toml %endif %pyproject_buildrequires %if "%{?bundle}" != "" mv pyproject.toml{.bak,} %endif %build %if "%{?bundle}" == "" %pyproject_wheel %endif %install %if "%{?bundle}" == "" %pyproject_install # 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 %else # each bundled package needs a Source: pip install --no-build-isolation --no-index --root %{buildroot} %SOURCE1 . %endif %post -n python3-homeassistant echo "post" set -x %systemd_post homeassistant.service %postun -n python3-homeassistant echo "postun" set -x %systemd_postun_with_restart homeassistant.service %check #%%if "%{?bundle}" == "" # The number of errors here is enormous! #%%pyproject_check_import -e homeassistant.auth.providers.trusted_networks -e homeassistant.components.abode -e homeassistant.components.abode.alarm_control_panel -e #%%endif %if "%{?bundle}" == "" %files -n python3-homeassistant -f %{pyproject_files} %else %files -n python3-homeassistant %exclude /usr/lib/debug %{_bindir}/* %{python3_sitelib}/* #%%{python3_sitearch}/* %endif %changelog * Sat Jun 22 2024 Brian J. Murrell - 2024.6.4-1 - Update to 2024.6.4 * Sun Jun 16 2024 Brian J. Murrell - 2024.6.3-1 - Update to 2024.6.3 * Wed Jun 12 2024 Brian J. Murrell - 2024.6.2-4 - Fix %%systemd_post_with_restart -> %%systemd_postun_with_restart * Wed Jun 12 2024 Brian J. Murrell - 2024.6.2-3 - Add -n python3-homeassistant to %%post* scriptlets * Tue Jun 11 2024 Brian J. Murrell - 2024.6.2-2 - Add %%systemd_post and %%systemd_postun_with_restart to restart the service on upgrade - Move %%bundled flag to a list of things to bundle * Tue Jun 11 2024 Brian J. Murrell - 2024.6.2-1 - Update to 2024.6.2 * Sat Jun 8 2024 Brian J. Murrell - 2024.6.1-1 - Update to 2024.6.1 * Thu Jun 6 2024 Brian J. Murrell - 2024.6.0-1 - Update to 2024.6.0 * Sat May 25 2024 Brian J. Murrell - 2024.5.5-2 - Change sqlalchemy requirement from == to => * Fri May 24 2024 Brian J. Murrell - 2024.5.5-1 - Update to 2024.5.5 * Sun May 19 2024 Brian J. Murrell - 2024.5.4-1 - Update to 2024.5.4 * Sat May 11 2024 Brian J. Murrell - 2024.5.3-1 - Update to 2024.5.3 - Change voluptuous and astral requirement from == to => * Wed Apr 24 2024 Brian J. Murrell - 2024.4.4-1 - Update to 2024.4.4 * Thu Apr 11 2024 Brian J. Murrell - 2024.4.3-1 - Update to 2024.4.3 - Change Pillow == 10.2.0 to >= - Move cryptography bundling to hass-nabucasa * Thu Mar 7 2024 Brian J. Murrell - 2024.3.0-1 - Update to 2024.3.0 - Bundle python-bcrypt * Fri Mar 1 2024 Brian J. Murrell - 2024.2.5-1 - Update to 2024.2.5 - Bundle python-cryptography until Fedora has a 42.x release * Fri Feb 9 2024 Brian J. Murrell - 2024.1.6-1 - Initial packaging%{?bundled:\ with many dependencies bundled} - Add Provides: homeassistant for more streamlined installs - Use python-atomicwrites provided by Fedora