# 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 pypi_name plotly %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-%{pypi_name} Version: 5.8.0 Release: 1%{?dist} 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 BuildArch: noarch %description %_description %package -n python%{python3_pkgversion}-%{pypi_name} Summary: %{summary} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: %{py3_dist setuptools} # 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 %if %{with tests} BuildRequires: %{py3_dist pytest} %endif %description -n python%{python3_pkgversion}-%{pypi_name} %_description %prep %autosetup -p1 -n %{pypi_name}-%{version} # Fix one file sed -i '/^#![ ]*\/usr\/bin\/env.*$/ d' _plotly_utils/png.py chmod -x _plotly_utils/png.py # etc jupyter path fix sed -i 's/etc\/jupyter/\/etc\/jupyter/g' setup.py %build %py3_build %install %py3_install %check %if %{with tests} pytest-%{python3_version} %endif %files -n python%{python3_pkgversion}-%{pypi_name} %license LICENSE.txt %doc README.md %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/_%{pypi_name}_utils %{python3_sitelib}/_%{pypi_name}_future_ %{python3_sitelib}/jupyterlab_plotly %config(noreplace) %{_sysconfdir}/jupyter/nbconfig/notebook.d/jupyterlab-plotly.json %changelog * Tue May 17 2022 Ali Erdinc Koroglu - 5.8.0-1 - Update to 5.8.0 (rhbz#1966329) * 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