## START: Set by rpmautospec ## (rpmautospec version 0.3.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; 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 # XXX 1: that they bundle one file in _plotly_utils: png.py, which is in the # pypng module. However, it is unclear if they're actively tracking the # upstream code so we just use their bundled copy. # XXX 2: There are empty files in the _plotly_future directory but they are # required and cannot be removed # They do not include tests in the pypi tar, and they don't make GitHub # releases only for the Python package---the GitHub tar also includes their JS # etc. bits which we don't need here. # Leave this here in case they do start including tests in their PyPi tar. %bcond_with tests %global _description %{expand: plotly.py is an interactive, open-source, and browser-based graphing library for Python. Built on top of plotly.js, plotly.py is a high-level, declarative charting library. plotly.js ships with over 30 chart types, including scientific charts, 3D graphs, statistical charts, SVG maps, financial charts, and more. plotly.py is MIT Licensed. Plotly graphs can be viewed in Jupyter notebooks, standalone HTML files, or hosted online using Chart Studio Cloud. Documentation is available at https://plotly.com/python/} Name: python-plotly Version: 5.9.0 Release: %autorelease Summary: An open-source, interactive data visualization library # https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses License: MIT URL: https://plotly.com/python/ Source0: %{pypi_source plotly} BuildArch: noarch %description %_description %package -n python%{python3_pkgversion}-plotly Summary: %{summary} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: %{py3_dist setuptools} BuildRequires: %{py3_dist pip} # not automatically pulled in BuildRequires: %{py3_dist ipywidgets} BuildRequires: %{py3_dist pandas} BuildRequires: %{py3_dist matplotlib} # For jupyter configs etc. Requires: python-jupyter-filesystem Recommends: %{py3_dist notebook} # For tests, but see note at top of spec # https://github.com/plotly/plotly.py/blob/master/.circleci/config.yml # https://github.com/plotly/plotly.py/blob/6c463ee500960000341cc735b2d95680ac48e3ad/packages/python/plotly/tox.ini # also required for import check BuildRequires: %{py3_dist pytest} %description -n python%{python3_pkgversion}-plotly %_description %prep %autosetup -p1 -n plotly-%{version} # Fix one file sed -i '/^#![ ]*\/usr\/bin\/env.*$/ d' _plotly_utils/png.py chmod -x _plotly_utils/png.py # remove jupyterlab dep, not required for build, and not packaged in Fedora sed -i "s/\"jupyterlab~=3.0;python_version>='3.6'\",//" pyproject.toml %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files plotly _plotly_utils _plotly_future_ jupyterlab_plotly install -m 0644 -p -d $RPM_BUILD_ROOT/%{_sysconfdir}/jupyter mv -v $RPM_BUILD_ROOT/%{_prefix}/etc/jupyter $RPM_BUILD_ROOT/%{_sysconfdir}/ %check %if %{with tests} %{pytest} %endif # exclude deprecated modules %pyproject_check_import -e plotly.config -e plotly.dashboard_objs -e plotly.grid_objs -e plotly.plotly* -e plotly.presentation_objs -e plotly.session -e plotly.widgets %files -n python%{python3_pkgversion}-plotly -f %{pyproject_files} %doc README.md %{_datadir}/jupyter/ %config(noreplace) %{_sysconfdir}/jupyter/nbconfig/notebook.d/jupyterlab-plotly.json %changelog * Fri Jan 20 2023 Fedora Release Engineering - 5.9.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Mon Aug 01 2022 Ankur Sinha (Ankur Sinha Gmail) - 5.9.0-1 - feat: update to 5.9.0 (fixes rhbz#1966329) * Sun Jul 31 2022 Ankur Sinha (Ankur Sinha Gmail) - 5.8.0-7 - chore: correct source macro usage * Sun Jul 31 2022 Ankur Sinha (Ankur Sinha Gmail) - 5.8.0-6 - chore: retab * Sun Jul 31 2022 Ali Erdinc Koroglu - 5.8.0-1 - Update to 5.8.0 (rhbz#1966329) * Fri Jul 22 2022 Fedora Release Engineering - 4.14.3-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 13 2022 Python Maint - 4.14.3-5 - Rebuilt for Python 3.11 * Fri Jan 21 2022 Fedora Release Engineering - 4.14.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Jul 23 2021 Fedora Release Engineering - 4.14.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 4.14.3-2 - Rebuilt for Python 3.10 * Fri Apr 16 2021 Ankur Sinha - 4.14.3-1 - Remove sphinx dep - use macros * Wed Apr 14 2021 Ankur Sinha - 4.14.3-1 - Initial build