## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global pypi_name plotnine # Generate HTML documentation # Currently not possible. Documentation depends on importlib_resources, # which is not yet available in Fedora %bcond_with doc # Provide man pages %bcond_without man # Run tests %bcond_without tests # For a a more readable input to %%pytest %global _skip_tests %{expand:\\ not logticks and not backtransforms and not se_false and not facet \\ and not label and not ribbon and not arrow and not adjust_text \\ and not caption_simple and not theme and not scale and not coords \\ and not geom_bar_col_histogram and not geom_bin_2d and not geom_boxplot \\ and not geom_density and not geom_dotplot and not geom_map \\ and not geom_point and not geom_raster and not geom_violin \\ and not lint_and_format and not position and not qplot and not stat_ecdf \\ and not stat_summary} %global _description %{expand: Implementation of a grammar of graphics in Python, based on ggplot2. The grammar allows users to compose plots by explicitly mapping data to the visual objects that make up the plot. Plotting with a grammar is powerful, it makes custom (and otherwise complex) plots easy to think about and then create, while the simple plots remain simple. Welcome to Plot 9 from Outerspace 🪐 🦇} Name: python-%{pypi_name} Version: 0.12.3 Release: %{autorelease} Summary: Implementation of a grammar of graphics in Python, based on ggplot2 BuildArch: noarch # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} # BSD-3-Clause applies to plotnine/themes/seaborn_rcmod.py # GPL-2.0-only applies to plotnine/themes/theme_tufte.py License: MIT AND BSD-3-Clause AND GPL-2.0-only URL: https://pypi.org/pypi/%{pypi_name} Source0: %{pypi_source %{pypi_name}} %description %_description %package -n python3-%{pypi_name} Summary: %{summary} BuildRequires: python3-devel BuildRequires: python3-geopandas BuildRequires: python3-adjustText BuildRequires: comic-neue-fonts %if %{with tests} BuildRequires: python3-pytest # Below packages are from extra extra, which we provide, but it looks # like it's not being installed, but needed for test BuildRequires: python3-adjustText BuildRequires: python3-scikit-misc BuildRequires: python3-scikit-learn BuildRequires: python3-geopandas # Test dependencies BuildRequires: python3-shapely, python3-statsmodels %endif %if %{with doc} BuildRequires: make BuildRequires: coreutils BuildRequires: python3-sphinx, python3-nbformat, python3-nbsphinx # python-importlib-resources currently not available in Fedora # jinja2: https://github.com/sphinx-doc/sphinx/issues/10291 BuildRequires: python3-importlib-resources python3-jinja2 < 3.1 %endif %description -n python3-%{pypi_name} %_description %pyproject_extras_subpkg -n python3-%{pypi_name} extra %if %{with doc} %package doc Summary: HTML documentation for %{name} Requires: python3-%{pypi_name} == %{version} %description doc %{summary} %endif %prep %autosetup -p1 -n %{pypi_name}-%{version} # Disable coverage in pytest sed -i -e 's/--cov=plotnine --cov-report=xml //' pyproject.toml # Tests are failing in f36 with ImportError # https://github.com/has2k1/plotnine/issues/643 %if 0%{?fedora} <= 36 rm -f tests/test_geom_bar_col_histogram.py tests/test_geom_bin_2d.py %endif %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %if %{with doc} pushd doc make html popd %endif %install %pyproject_install %if %{with doc} mkdir -p ${RPM_BUILD_ROOT}%{_pkgdocdir} cp -a doc/_build/html ${RPM_BUILD_ROOT}%{_pkgdocdir} rm -rf ${RPM_BUILD_ROOT}%{_pkgdocdir}/html/.buildinfo %endif %pyproject_save_files %{pypi_name} %check %if %{with tests} %if 0%{?fedora} <= 36 %pytest -k "%_skip_tests and not stat_bin" %else %pytest -k "%_skip_tests" %endif %else %pyproject_check_import %endif %files -n python3-plotnine -f %{pyproject_files} %doc README.md %license LICENSE %if %{with doc} %files doc %dir %{_pkgdocdir} %doc %{_pkgdocdir}/html %endif %changelog * Sun Sep 03 2023 Sandro - 0.12.3-1 - Update to 0.12.3 (RHBZ#2224511) * Thu Jul 20 2023 Elliott Sales de Andrade - 0.12.1-2 - Rebuild for Python 3.12b4 * Sun Jul 02 2023 Sandro - 0.12.1-1 - Update to 0.12.1 (RHBZ#2196634) * Wed Apr 19 2023 Sandro - 0.10.1-8 - Drop '-S git' from %%autosetup since we have no patches * Tue Apr 18 2023 Sandro - 0.10.1-7 - Rebuild for updated python-mizani * Fri Jan 20 2023 Fedora Release Engineering - 0.10.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Mon Dec 19 2022 Elliott Sales de Andrade - 0.10.1-5 - Drop support for i686 * Tue Nov 01 2022 Sandro - 0.10.1-4 - Fix tests for f36 - Remove test files causing ImportError - Disable one additional test in f36 * Mon Oct 24 2022 Sandro - 0.10.1-3 - Initial release (RHBZ#2133439) * Mon Oct 24 2022 Sandro - 0.10.1-2 - amend! Initial release (BZ#2133439) * Mon Oct 24 2022 Sandro - 0.10.1-1 - Initial release (BZ#2133439)