# Build a version bundled with some dependencies %global bundled 0 Name: python-homeassistant Version: 2024.6.1 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 0%{?bundled} > 0 BuildRequires: python3-pip %endif # 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 0%{?bundled} > 0 cp -a pyproject.toml{,.bak} # things we are going to bundle sed -i -e '/"cryptography==/d' pyproject.toml %endif %pyproject_buildrequires %if 0%{?bundled} > 0 mv pyproject.toml{.bak,} %endif %build %if 0%{?bundled} < 1 %pyproject_wheel %endif %install %if 0%{?bundled} < 1 %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 # cryptography pip install --no-build-isolation --no-index --root %{buildroot} %SOURCE1 . %endif %check #%%if 0%{?bundled} < 1 # 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 0%{?bundled} < 1 %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 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