diff --git a/NEWS b/NEWS index 6e76efd67..e412cc5d2 100644 --- a/NEWS +++ b/NEWS @@ -147,6 +147,12 @@ New in spot 2.9.4.dev (not yet released) - Bindings for functions related to parity games. See https://spot.lrde.epita.fr/ipynb/paritygame.html for examples. + Bugs fixed: + + - The filename python/spot/aux.py caused a problem on Windows and + has been renamed. Existing "import spot.aux" statements should + *not* be updated. (Issue #437.) + New in spot 2.9.4 (2020-09-07) Bugs fixed: diff --git a/python/Makefile.am b/python/Makefile.am index ae5660a2f..704aa9a8d 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -30,7 +30,7 @@ SWIGFLAGS = -c++ -python -py3 -O -MD EXTRA_DIST = buddy.i spot/impl.i spot/ltsmin.i spot/gen.i nobase_pyexec_PYTHON = \ spot/__init__.py \ - spot/aux.py \ + spot/aux_.py \ spot/impl.py \ spot/ltsmin.py \ spot/gen.py \ diff --git a/python/spot/__init__.py b/python/spot/__init__.py index f5beecee1..dee08467a 100644 --- a/python/spot/__init__.py +++ b/python/spot/__init__.py @@ -47,6 +47,12 @@ for path in sys.path: from spot.impl import * +# spot.aux_ used to be called spot.aux until the filename aux.py +# caused issues on Windows. So the file is now named aux_.py, but we +# still want to import it as spot.aux, hence we add it to spot.modules +# as an alias. +import spot.aux_ as aux +sys.modules['spot.aux'] = aux from spot.aux import \ extend as _extend, \ str_to_svg as _str_to_svg, \ diff --git a/python/spot/aux.py b/python/spot/aux_.py similarity index 93% rename from python/spot/aux.py rename to python/spot/aux_.py index cd56d212b..3c6435296 100644 --- a/python/spot/aux.py +++ b/python/spot/aux_.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2016, 2019 Laboratoire de Recherche et Développement de l'Epita -# (LRDE). +# Copyright (C) 2016, 2019-2020 Laboratoire de Recherche et +# Développement de l'Epita (LRDE). # # This file is part of Spot, a model checking library. # @@ -17,6 +17,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# This file is named "aux_.py" for compatibility with Windows' +# historical limitations, but should really be imported as "spot.aux". + """ Auxiliary functions for Spot's Python bindings """