# # spec file for package python-pydot # # Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?sle15_python_module_pythons} Name: python-pydot Version: 3.0.4 Release: 1.2 Summary: Module to create (dot) graphs from Python License: MIT URL: https://github.com/erocarrera/pydot Source: https://files.pythonhosted.org/packages/source/p/pydot/pydot-%{version}.tar.gz BuildRequires: %{python_module base >= 3.8} BuildRequires: %{python_module chardet} BuildRequires: %{python_module parameterized} BuildRequires: %{python_module pip} BuildRequires: %{python_module pyparsing >= 3.0.9} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: ghostscript-fonts-std BuildRequires: graphviz BuildRequires: graphviz-gd BuildRequires: python-rpm-macros Requires: graphviz Requires: graphviz-gd Requires: python-pyparsing >= 3.0.9 # we need at least some fonts Requires: dejavu-fonts BuildArch: noarch %python_subpackages %description pydot allows to create both directed and non-directed graphs from Python. All attributes implemented in the Dot language up to Graphviz 2.16 are supported. %prep %autosetup -p1 -n pydot-%{version} %build %pyproject_wheel %install %pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %pytest %files %{python_files} %license LICENSES/MIT.txt LICENSES/Python-2.0.txt %doc README.md %{python_sitelib}/pydot %{python_sitelib}/pydot-%{version}.dist-info %changelog * Tue Feb 4 2025 Steve Kowalik - Update to 3.0.4: * Removed: + Breaking change: support for Python 3.7 dropped totally. It was already dropped, but now it's official. + Breaking change (but for nobody): Invalid syntax removed. Removed syntax rules that were never implemented in graphviz's own parser. + Attribute sorting removed. Pydot will preserve the original order of attributes as defined. + Breaking change: Remove `.create_attribute_methods()` from classes. Setters and getters for attributes are now added to class definitions by calls to `pydot.core.__generate_attribute_methods()` immediately after the class is defined, for better compatibility with type-checking and introspection. * Changed: + Fixed quoting of identifiers with dots. + Fixed quoting of leading-numeral strings (strings starting with a number). + Fixed pickling/copying of Dot objects. + Improved handling of temporary files. Temporary files will be cleaned up in all cases, even when exceptions are raised or things exit unexpectedly. + From now on, the license files will be included in the distributed release as expected. + Fix quoting in `Edge.to_string()`. + Internal storage and lookup of identifiers (names) improved. Pydot now always stores values as they were originally input, and only performs quoting on output. + Quoting for attribute values fixed. Attribute values containing comma-separated strings will now be quoted correctly. * Added: + All `to_string()` methods now accept an `indent` keyword argument, which can be either a number or a string. `indentation=4` will indent each level of the output with four spaces. `indentation=" "` will indent each level by that many spaces. Other whitespace is also valid, e.g. indent="\t" for tab indents. + Keywords can now be used as names or attribute values. Graphviz keywords like "graph" or "subgraph" will now be properly quoted when used as attribute values or as names, where appropriate. + Add standard Python logging, using the logger name `pydot`. - Switch to using pytest to run the testsuite. * Mon Feb 26 2024 Steve Kowalik - Update to 2.0.0: * Changed: + Broken parsing caused by `pyparsing` updates fixed. + Reorganized package/module structure. + Reorganized exception hierarchy. * Deprecated: + Test suite option `--no-check`. * Removed: + Drop support for Python 2 and Python < 3.7. - Drop patch pydot-skip-test.patch, no longer required. - Switch to autosetup and pyproject macros. * Tue Jun 13 2023 ecsos - Add %%{?sle15_python_module_pythons} * Tue Dec 7 2021 Dirk Müller - skip failing tests * Thu Apr 22 2021 Dirk Müller - update to 1.4.2: - Documentation: Basic usage examples in `README.md`. (#141) Changed: - More detailed error message in case of Graphviz errors. (#239) - More detailed warning message in case of failure to import the DOT parser module. (#241) Deprecated: - A future pydot 2.0.0 will drop support for Python 2, 3.4 and possibly other Python versions that are end-of-life at that time. Pydot does not emit any deprecation warnings about this. Further pydot 1.x.x releases are currently not foreseen, but if there are any, should still support the mentioned Python versions. (#229) Fixed: - On Python 2, non-equality comparison (`!=`) between two separate, but equal `Edge` instances will now correctly return `False`, as it already did on Python 3. (#248) - Prevent `TypeError` in handling of DOT parser error. (#176) - Prevent `TypeError` in `graph_from_adjacency_matrix()` and `graph_from_incidence_matrix()`. (#98) - Prevent `TypeError` when creating an edge with a `Subgraph` or `Cluster` object (as opposed to name string) as an edge point. (#89) - Windows only: Fixed most failures to find Graphviz when a conda or Anaconda installation exists, but Graphviz was installed manually or through pip (`.bat`/`.exe` suffix problem). (#205) - Windows only: Fixed failure to run Graphviz related to side-by-side assembly (SxS) by now propagating the `SYSTEMROOT` environment variable. (#208) * Tue Feb 25 2020 Tomáš Chvátal - We need the full graphviz-gd as otherwise it acts really weirdly * Thu Apr 4 2019 Tomáš Chvátal - Skip one failing test: * pydot-skip-test.patch - Enable testsuite and add tests dependencies * Tue Apr 2 2019 Colleen Murphy - Update to 1.4.1: * Make graph, edge, node attributes order deterministic * Fix string formatting after catching error (#201) * Installation of pydot in conda env on Windows directly supported * Fixed comparing of SHA hash in regression tests (which fail now) * Dropped Python 2.6 support (#185) * Move errno from os to builtin. Fixes #177 (#191, #182) * Tue Dec 18 2018 Jan Engelhardt - Use noun phrase in summary. Grammar adjustments for the description. * Tue Dec 4 2018 Matej Cepl - Remove superfluous devel dependency for noarch package * Sat Jan 6 2018 arun@gmx.de - specfile: * update copyright year - update to version 1.2.4: * ENH: propagate `LD_LIBRARY_PATH` when calling GraphViz * API: raise `OSError` when a GraphViz executable is not found * API: add method `__str__` to classes `Node, Edge, Graph` * API: add arg `encoding` to `Dot` methods `create, write` * API: quote cluster names when necessary * API: give source and destination nodes as separate args to `Edge.__init__` * API: never ignore `src, dst`, overwrite if `points` defined in `obj_dict` * Wed Apr 19 2017 toddrme2178@gmail.com - Implement single-spec version. * Tue Nov 1 2016 toddrme2178@gmail.com - Update source url - Remove some obsolete parts of the spec file * Tue Nov 1 2016 toddrme2178@gmail.com - Update to 1.2.3 - support Python 2.6 - several corrections - quote empty strings to avoid graphviz errors - Update to 1.2.0 - support Python 3 - bumped dependency to `pyparsing >= 2.1.4` - tests running on Travis CI - tests require `chardet` - detect character encoding for most test files using the package `chardet` - API: + on all operating systems, search GraphViz executables in environment `$PATH`, using `subprocess.Popen`. No paths hard-coded due to security and privacy issues. + add option to pass GraphViz executable name or absolute path as `prog` to `pydot.Dot.write_*` methods. This provides an alternative to adding GraphViz to the `$PATH`. + the functions: * `pydot.graph_from_dot_data` * `pydot.graph_from_dot_file` * `dot_parser.parse_dot_data` changed to always return a `list` of graphs, instead of behaving differently for singletons. + require that the user explicitly give an encoding to the function `pydot.graph_from_dot_file`, with default encoding same as `io.open`. + decode to unicode at program boundaries, and treat binary images as bytes, for more compatibility with python 3. Use `io.open`, instead of the built-in `open`. + rm function `pydot.set_graphviz_executables` + rm attribute `pydot.Dot.progs` - Update to 1.1.0 - compatibility with `pyparsing >= 1.5.7` - API: + `pydot.Graph.to_string`: hide `subgraph` keyword only if so requested + produce `warnings.warn` if `pydot.dot_parser` fails to import, instead of `print` - Update to 1.0.29 - Maintenance release that keeps the same API - pin `pyparsing == 1.5.7` - update version number in source code - update `setup.py` - Remove unneeded python-pydot-1.0.28_fix_pyparser_2_incompatibility.patch - Remove out-of-date example files * Sat May 3 2014 andrea@opensuse.org - added python-pydot-1.0.28_fix_pyparser_2_incompatibility.patch to fix incompatibility when using pydot with pyparser 2 * Fri May 25 2012 toddrme2178@gmail.com - Update to version 1.0.28 * Bugfixes - Spec file cleanup * Wed Jun 1 2011 saschpe@suse.de - Update to version 1.0.25 * Minor bugfixes - Spec file cleanup: * Package examples as 'examples' * Use SUSE version checks for %%py_requires and noarch * Thu Feb 17 2011 jw@novell.com - Update to 1.0.4 - Example-demo.py added. * Thu Feb 17 2011 jw@novell.com - Taken from home:leo_eraly