# 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. # UPDATE: All separate Python packages are tagged separately. That # makes it easy # to get the source tarball from GitHub, that corresponds # to a PyPI release and allows us to run tests. %bcond tests 1 # F43FailsToInstall: python3-xarray+io, python3-xarray # https://bugzilla.redhat.com/show_bug.cgi?id=2372200 %bcond xarray %[ %{defined fc41} || %{defined fc42} ] Name: python-plotly Version: 6.5.0 Release: %autorelease Summary: An open-source, interactive data visualization library %global forgeurl https://github.com/plotly/plotly.py %global tag v%{version} %forgemeta # Main license is MIT. Some JS parts are BSD-3-Clause License: MIT AND BSD-3-Clause URL: https://plotly.com/python/ Source0: %{forgesource} BuildArch: noarch BuildRequires: python3-devel BuildRequires: %{py3_dist pytest} BuildRequires: %{py3_dist numpy} BuildRequires: %{py3_dist matplotlib} #BuildRequires: %{py3_dist anywidget} BuildRequires: %{py3_dist traitlets} BuildRequires: %{py3_dist requests} BuildRequires: %{py3_dist pandas} BuildRequires: %{py3_dist pdfrw} BuildRequires: %{py3_dist xarray} BuildRequires: %{py3_dist scipy} BuildRequires: %{py3_dist IPython} BuildRequires: %{py3_dist pyarrow} BuildRequires: %{py3_dist nbformat} BuildRequires: python3dist(scikit-image) #BuildRequires: %{py3_dist polars} %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, other Python notebook software such as marimo, as standalone HTML files, or integrated into Dash applications.} %description %_description %package -n python3-plotly Summary: %{summary} # For jupyter configs etc. Requires: python-jupyter-filesystem Recommends: python3-notebook # Additional packages for use with plotly Recommends: python3-chart-studio Recommends: python3-plotly-geo %description -n python3-plotly %_description %prep %forgeautosetup -p1 sed -i 's|jupyter_packaging~=|jupyter_packaging>=|' pyproject.toml sed -i 's|"polars",||' plotly/data/__init__.py %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l plotly _plotly_utils %check %if %{with tests} %pyproject_check_import -e plotly.basewidget # polars not packaged ignore="${ignore-} --ignore=tests/test_optional/test_px" # kaleido not packaged ignore="${ignore-} --ignore=tests/test_optional/test_kaleido/test_kaleido.py" # anywidget not packaged deselect="${deselect-} --deselect=tests/test_io/test_to_from_json.py::test_from_json_output_type \ --deselect=tests/test_io/test_to_from_json.py::test_read_json_from_filelike \ --deselect=tests/test_io/test_to_from_json.py::test_read_json_from_pathlib \ --deselect=tests/test_io/test_to_from_json.py::test_read_json_from_file_string" deselect="${deselect-} --deselect=plotly/matplotlylib/mplexporter/tests/test_basic.py::test_legend_dots \ --deselect=plotly/matplotlylib/mplexporter/tests/test_utils.py::test_linestyle \ --deselect=test_init/test_dependencies_not_imported.py::test_dependencies_not_imported \ --deselect=test_init/test_lazy_imports.py::test_lazy_imports \ --deselect=tests/test_io/test_renderers.py::test_default_renderer \ --deselect=tests/test_optional/test_figure_factory/test_figure_factory.py::TestViolin::test_violin_fig \ --deselect=tests/test_plotly_utils/validators/test_colorscale_validator.py::test_acceptance_named[Inferno_r] \ --deselect=tests/test_plotly_utils/validators/test_fig_deepcopy.py::test_deepcopy_dataframe[polars]" %pytest ${ignore-} ${deselect-} %endif %files -n python3-plotly -f %{pyproject_files} %doc README.md %{_bindir}/plotly_get_chrome %{_datadir}/jupyter/ %changelog %autochangelog