From 5baa9cabbac2ab6db4d8ea0bd2045beb225dbe27 Mon Sep 17 00:00:00 2001 From: Nicola Musatti Date: Sat, 8 Jun 2024 19:33:24 +0200 Subject: [PATCH 1/5] Add automatically migrated pyproject.toml files --- libs/abstract/pyproject.toml | 44 ++++++++++++++++++++ libs/backup_file/pyproject.toml | 45 +++++++++++++++++++++ libs/command/pyproject.toml | 45 +++++++++++++++++++++ libs/core/pyproject.toml | 40 ++++++++++++++++++ libs/file/pyproject.toml | 43 ++++++++++++++++++++ libs/file_object/pyproject.toml | 40 ++++++++++++++++++ libs/maven/pyproject.toml | 47 ++++++++++++++++++++++ libs/memo/pyproject.toml | 44 ++++++++++++++++++++ libs/nonblocking_subprocess/pyproject.toml | 44 ++++++++++++++++++++ libs/past/pyproject.toml | 40 ++++++++++++++++++ libs/path/pyproject.toml | 40 ++++++++++++++++++ libs/ply/pyproject.toml | 42 +++++++++++++++++++ libs/sequence/pyproject.toml | 42 +++++++++++++++++++ libs/sort/pyproject.toml | 40 ++++++++++++++++++ libs/svn/pyproject.toml | 46 +++++++++++++++++++++ libs/temp_file/pyproject.toml | 44 ++++++++++++++++++++ libs/test/pyproject.toml | 43 ++++++++++++++++++++ libs/xml/pyproject.toml | 45 +++++++++++++++++++++ pyproject.toml | 42 +++++++++++++++++++ 19 files changed, 816 insertions(+) create mode 100644 libs/abstract/pyproject.toml create mode 100644 libs/backup_file/pyproject.toml create mode 100644 libs/command/pyproject.toml create mode 100644 libs/core/pyproject.toml create mode 100644 libs/file/pyproject.toml create mode 100644 libs/file_object/pyproject.toml create mode 100644 libs/maven/pyproject.toml create mode 100644 libs/memo/pyproject.toml create mode 100644 libs/nonblocking_subprocess/pyproject.toml create mode 100644 libs/past/pyproject.toml create mode 100644 libs/path/pyproject.toml create mode 100644 libs/ply/pyproject.toml create mode 100644 libs/sequence/pyproject.toml create mode 100644 libs/sort/pyproject.toml create mode 100644 libs/svn/pyproject.toml create mode 100644 libs/temp_file/pyproject.toml create mode 100644 libs/test/pyproject.toml create mode 100644 libs/xml/pyproject.toml create mode 100644 pyproject.toml diff --git a/libs/abstract/pyproject.toml b/libs/abstract/pyproject.toml new file mode 100644 index 0000000..9e84b92 --- /dev/null +++ b/libs/abstract/pyproject.toml @@ -0,0 +1,44 @@ +[build-system] +#requires = ["hatchling"] +#build-backend = "hatchling.build" +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "nxpy-abstract" +dynamic = ["version"] +description = "Abstract class helpers" +readme = "README.rst" +license = "Boost Software License 1.0 (BSL-1.0)" +authors = [ + { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Boost Software License 1.0 (BSL-1.0)", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Topic :: Software Development :: Libraries", +] +dependencies = [ + "six", +] + +[project.urls] +Documentation = "https://nxpy.readthedocs.io/en/latest/abstract.html" +Homepage = "https://github.com/nmusatti/nxpy" +"Source Code" = "https://github.com/nmusatti/nxpy/tree/master/libs/abstract" + +[tool.hatch.version] +path = "nxpy/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/nxpy", +] diff --git a/libs/backup_file/pyproject.toml b/libs/backup_file/pyproject.toml new file mode 100644 index 0000000..f884fc3 --- /dev/null +++ b/libs/backup_file/pyproject.toml @@ -0,0 +1,45 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "nxpy-backup-file" +dynamic = ["version"] +description = "A file-like object that keeps a copy of the file being edited" +readme = "README.rst" +license = "Boost Software License 1.0 (BSL-1.0)" +authors = [ + { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Boost Software License 1.0 (BSL-1.0)", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Topic :: Software Development :: Libraries", +] +dependencies = [ + "nxpy_core", + "nxpy_file_object", + "nxpy_path", + "six", +] + +[project.urls] +Documentation = "https://nxpy.readthedocs.io/en/latest/" +Homepage = "https://github.com/nmusatti/nxpy" +"Source Code" = "https://github.com/nmusatti/nxpy" + +[tool.hatch.version] +path = "nxpy/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/nxpy", +] diff --git a/libs/command/pyproject.toml b/libs/command/pyproject.toml new file mode 100644 index 0000000..6a95eb1 --- /dev/null +++ b/libs/command/pyproject.toml @@ -0,0 +1,45 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "nxpy-command" +dynamic = ["version"] +description = "Wrap programs to call them as Python methods" +readme = "README.rst" +license = "Boost Software License 1.0 (BSL-1.0)" +authors = [ + { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Boost Software License 1.0 (BSL-1.0)", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Topic :: Software Development :: Libraries", +] +dependencies = [ + "nxpy_core", + "nxpy_nonblocking_subprocess", + "nxpy_sequence", + "six", +] + +[project.urls] +Documentation = "https://nxpy.readthedocs.io/en/latest/" +Homepage = "https://github.com/nmusatti/nxpy" +"Source Code" = "https://github.com/nmusatti/nxpy" + +[tool.hatch.version] +path = "nxpy/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/nxpy", +] diff --git a/libs/core/pyproject.toml b/libs/core/pyproject.toml new file mode 100644 index 0000000..8a99382 --- /dev/null +++ b/libs/core/pyproject.toml @@ -0,0 +1,40 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "nxpy-core" +dynamic = ["version"] +description = "Infrastructure common to the Nxpy libraries" +readme = "README.rst" +license = "Boost Software License 1.0 (BSL-1.0)" +authors = [ + { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Boost Software License 1.0 (BSL-1.0)", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Topic :: Software Development :: Libraries", +] +dependencies = [] + +[project.urls] +Documentation = "https://nxpy.readthedocs.io/en/latest/core.html" +Homepage = "https://github.com/nmusatti/nxpy" +"Source Code" = "https://github.com/nmusatti/nxpy/tree/master/libs/core" + +[tool.hatch.version] +path = "nxpy/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/nxpy", +] diff --git a/libs/file/pyproject.toml b/libs/file/pyproject.toml new file mode 100644 index 0000000..1e83193 --- /dev/null +++ b/libs/file/pyproject.toml @@ -0,0 +1,43 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "nxpy-file" +dynamic = ["version"] +description = "File manipulation utilities" +readme = "README.rst" +license = "Boost Software License 1.0 (BSL-1.0)" +authors = [ + { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Boost Software License 1.0 (BSL-1.0)", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Topic :: Software Development :: Libraries", +] +dependencies = [ + "nxpy_past", + "six", +] + +[project.urls] +Documentation = "https://nxpy.readthedocs.io/en/latest/" +Homepage = "https://github.com/nmusatti/nxpy" +"Source Code" = "https://github.com/nmusatti/nxpy" + +[tool.hatch.version] +path = "nxpy/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/nxpy", +] diff --git a/libs/file_object/pyproject.toml b/libs/file_object/pyproject.toml new file mode 100644 index 0000000..708e5bf --- /dev/null +++ b/libs/file_object/pyproject.toml @@ -0,0 +1,40 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "nxpy-file-object" +dynamic = ["version"] +description = "Helper classes to implement file-like objects" +readme = "README.rst" +license = "Boost Software License 1.0 (BSL-1.0)" +authors = [ + { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Boost Software License 1.0 (BSL-1.0)", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Topic :: Software Development :: Libraries", +] +dependencies = [] + +[project.urls] +Documentation = "https://nxpy.readthedocs.io/en/latest/" +Homepage = "https://github.com/nmusatti/nxpy" +"Source Code" = "https://github.com/nmusatti/nxpy" + +[tool.hatch.version] +path = "nxpy/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/nxpy", +] diff --git a/libs/maven/pyproject.toml b/libs/maven/pyproject.toml new file mode 100644 index 0000000..4b3119b --- /dev/null +++ b/libs/maven/pyproject.toml @@ -0,0 +1,47 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "nxpy-maven" +dynamic = ["version"] +description = "Utilities for the Maven build tool" +readme = "README.rst" +license = "Boost Software License 1.0 (BSL-1.0)" +authors = [ + { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Boost Software License 1.0 (BSL-1.0)", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Topic :: Software Development :: Libraries", +] +dependencies = [ + "lxml", + "nxpy_command", + "nxpy_core", + "nxpy_sequence", + "nxpy_xml", + "six", +] + +[project.urls] +Documentation = "https://nxpy.readthedocs.io/en/latest/" +Homepage = "https://github.com/nmusatti/nxpy" +"Source Code" = "https://github.com/nmusatti/nxpy" + +[tool.hatch.version] +path = "nxpy/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/nxpy", +] diff --git a/libs/memo/pyproject.toml b/libs/memo/pyproject.toml new file mode 100644 index 0000000..6ae718d --- /dev/null +++ b/libs/memo/pyproject.toml @@ -0,0 +1,44 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "nxpy-memo" +dynamic = ["version"] +description = "Base class to implement self-memoizing types" +readme = "README.rst" +license = "Boost Software License 1.0 (BSL-1.0)" +authors = [ + { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Boost Software License 1.0 (BSL-1.0)", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Topic :: Software Development :: Libraries", +] +dependencies = [ + "nxpy_abstract", + "nxpy_past", + "six", +] + +[project.urls] +Documentation = "https://nxpy.readthedocs.io/en/latest/" +Homepage = "https://github.com/nmusatti/nxpy" +"Source Code" = "https://github.com/nmusatti/nxpy" + +[tool.hatch.version] +path = "nxpy/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/nxpy", +] diff --git a/libs/nonblocking_subprocess/pyproject.toml b/libs/nonblocking_subprocess/pyproject.toml new file mode 100644 index 0000000..b20bfb1 --- /dev/null +++ b/libs/nonblocking_subprocess/pyproject.toml @@ -0,0 +1,44 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "nxpy-nonblocking-subprocess" +dynamic = ["version"] +description = "subprocess.Popen subclass using non-blocking I/O" +readme = "README.rst" +license = "Boost Software License 1.0 (BSL-1.0)" +authors = [ + { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Boost Software License 1.0 (BSL-1.0)", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Topic :: Software Development :: Libraries", +] +dependencies = [ + "nxpy_past", + "pypiwin32; sys_platform == \"win32\"", + "six", +] + +[project.urls] +Documentation = "https://nxpy.readthedocs.io/en/latest/" +Homepage = "https://github.com/nmusatti/nxpy" +"Source Code" = "https://github.com/nmusatti/nxpy" + +[tool.hatch.version] +path = "nxpy/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/nxpy", +] diff --git a/libs/past/pyproject.toml b/libs/past/pyproject.toml new file mode 100644 index 0000000..61f4230 --- /dev/null +++ b/libs/past/pyproject.toml @@ -0,0 +1,40 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "nxpy-past" +dynamic = ["version"] +description = "Python version based conditionals" +readme = "README.rst" +license = "Boost Software License 1.0 (BSL-1.0)" +authors = [ + { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Boost Software License 1.0 (BSL-1.0)", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Topic :: Software Development :: Libraries", +] +dependencies = [] + +[project.urls] +Documentation = "https://nxpy.readthedocs.io/en/latest/past.html" +Homepage = "https://github.com/nmusatti/nxpy" +"Source Code" = "https://github.com/nmusatti/nxpy/tree/master/libs/past" + +[tool.hatch.version] +path = "nxpy/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/nxpy", +] diff --git a/libs/path/pyproject.toml b/libs/path/pyproject.toml new file mode 100644 index 0000000..6de9ce2 --- /dev/null +++ b/libs/path/pyproject.toml @@ -0,0 +1,40 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "nxpy-path" +dynamic = ["version"] +description = "Wrap programs to call them as Python methods" +readme = "README.rst" +license = "Boost Software License 1.0 (BSL-1.0)" +authors = [ + { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Boost Software License 1.0 (BSL-1.0)", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Topic :: Software Development :: Libraries", +] +dependencies = [] + +[project.urls] +Documentation = "https://nxpy.readthedocs.io/en/latest/" +Homepage = "https://github.com/nmusatti/nxpy" +"Source Code" = "https://github.com/nmusatti/nxpy" + +[tool.hatch.version] +path = "nxpy/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/nxpy", +] diff --git a/libs/ply/pyproject.toml b/libs/ply/pyproject.toml new file mode 100644 index 0000000..7be5668 --- /dev/null +++ b/libs/ply/pyproject.toml @@ -0,0 +1,42 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "nxpy-ply" +dynamic = ["version"] +description = "Utilities for the PLY parser generator" +readme = "README.rst" +license = "Boost Software License 1.0 (BSL-1.0)" +authors = [ + { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Boost Software License 1.0 (BSL-1.0)", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Topic :: Software Development :: Libraries", +] +dependencies = [ + "ply", +] + +[project.urls] +Documentation = "https://nxpy.readthedocs.io/en/latest/" +Homepage = "https://github.com/nmusatti/nxpy" +"Source Code" = "https://github.com/nmusatti/nxpy" + +[tool.hatch.version] +path = "nxpy/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/nxpy", +] diff --git a/libs/sequence/pyproject.toml b/libs/sequence/pyproject.toml new file mode 100644 index 0000000..01fa0b7 --- /dev/null +++ b/libs/sequence/pyproject.toml @@ -0,0 +1,42 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "nxpy-sequence" +dynamic = ["version"] +description = "Sequence related tools" +readme = "README.rst" +license = "Boost Software License 1.0 (BSL-1.0)" +authors = [ + { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Boost Software License 1.0 (BSL-1.0)", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Topic :: Software Development :: Libraries", +] +dependencies = [ + "six", +] + +[project.urls] +Documentation = "https://nxpy.readthedocs.io/en/latest/" +Homepage = "https://github.com/nmusatti/nxpy" +"Source Code" = "https://github.com/nmusatti/nxpy" + +[tool.hatch.version] +path = "nxpy/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/nxpy", +] diff --git a/libs/sort/pyproject.toml b/libs/sort/pyproject.toml new file mode 100644 index 0000000..a9a3d8c --- /dev/null +++ b/libs/sort/pyproject.toml @@ -0,0 +1,40 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "nxpy-sort" +dynamic = ["version"] +description = "Sorting utilities" +readme = "README.rst" +license = "Boost Software License 1.0 (BSL-1.0)" +authors = [ + { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Boost Software License 1.0 (BSL-1.0)", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Topic :: Software Development :: Libraries", +] +dependencies = [] + +[project.urls] +Documentation = "https://nxpy.readthedocs.io/en/latest/" +Homepage = "https://github.com/nmusatti/nxpy" +"Source Code" = "https://github.com/nmusatti/nxpy" + +[tool.hatch.version] +path = "nxpy/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/nxpy", +] diff --git a/libs/svn/pyproject.toml b/libs/svn/pyproject.toml new file mode 100644 index 0000000..71c227b --- /dev/null +++ b/libs/svn/pyproject.toml @@ -0,0 +1,46 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "nxpy-svn" +dynamic = ["version"] +description = "Python wrapper for Subversion" +readme = "README.rst" +license = "Boost Software License 1.0 (BSL-1.0)" +authors = [ + { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Boost Software License 1.0 (BSL-1.0)", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Topic :: Software Development :: Libraries", +] +dependencies = [ + "nxpy_command", + "nxpy_core", + "nxpy_past", + "nxpy_temp_file", + "six", +] + +[project.urls] +Documentation = "https://nxpy.readthedocs.io/en/latest/" +Homepage = "https://github.com/nmusatti/nxpy" +"Source Code" = "https://github.com/nmusatti/nxpy" + +[tool.hatch.version] +path = "nxpy/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/nxpy", +] diff --git a/libs/temp_file/pyproject.toml b/libs/temp_file/pyproject.toml new file mode 100644 index 0000000..4addb74 --- /dev/null +++ b/libs/temp_file/pyproject.toml @@ -0,0 +1,44 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "nxpy-temp-file" +dynamic = ["version"] +description = "Temporary file and directory handling" +readme = "README.rst" +license = "Boost Software License 1.0 (BSL-1.0)" +authors = [ + { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Boost Software License 1.0 (BSL-1.0)", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Topic :: Software Development :: Libraries", +] +dependencies = [ + "nxpy_file_object", + "nxpy_past", + "nxpy_path", +] + +[project.urls] +Documentation = "https://nxpy.readthedocs.io/en/latest/" +Homepage = "https://github.com/nmusatti/nxpy" +"Source Code" = "https://github.com/nmusatti/nxpy" + +[tool.hatch.version] +path = "nxpy/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/nxpy", +] diff --git a/libs/test/pyproject.toml b/libs/test/pyproject.toml new file mode 100644 index 0000000..c98177d --- /dev/null +++ b/libs/test/pyproject.toml @@ -0,0 +1,43 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "nxpy-test" +dynamic = ["version"] +description = "Test related utilities for the Nxpy libraries" +readme = "README.rst" +license = "Boost Software License 1.0 (BSL-1.0)" +authors = [ + { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Boost Software License 1.0 (BSL-1.0)", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Topic :: Software Development :: Libraries", +] +dependencies = [ + "nxpy_memo", + "nxpy_past", +] + +[project.urls] +Documentation = "https://nxpy.readthedocs.io/en/latest/" +Homepage = "https://github.com/nmusatti/nxpy" +"Source Code" = "https://github.com/nmusatti/nxpy" + +[tool.hatch.version] +path = "nxpy/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/nxpy", +] diff --git a/libs/xml/pyproject.toml b/libs/xml/pyproject.toml new file mode 100644 index 0000000..8ba9470 --- /dev/null +++ b/libs/xml/pyproject.toml @@ -0,0 +1,45 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "nxpy-xml" +dynamic = ["version"] +description = "Utilities for the Lxml library" +readme = "README.rst" +license = "Boost Software License 1.0 (BSL-1.0)" +authors = [ + { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Boost Software License 1.0 (BSL-1.0)", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Topic :: Software Development :: Libraries", +] +dependencies = [ + "lxml", + "nxpy_core", + "nxpy_past", + "six", +] + +[project.urls] +Documentation = "https://nxpy.readthedocs.io/en/latest/" +Homepage = "https://github.com/nmusatti/nxpy" +"Source Code" = "https://github.com/nmusatti/nxpy" + +[tool.hatch.version] +path = "nxpy/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/nxpy", +] diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..beda8a3 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,42 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "Nxpy" +dynamic = ["version"] +description = "Nick's Python Toolbox" +readme = "README.rst" +license = "Boost Software License 1.0 (BSL-1.0)" +authors = [ + { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Boost Software License 1.0 (BSL-1.0)", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Topic :: Software Development :: Libraries", +] +dependencies = [ + "six", +] + +[project.urls] +Documentation = "https://nxpy.readthedocs.io/en/latest/" +"Source Code" = "https://github.com/nmusatti/nxpy" + +[tool.hatch.version] +path = "nxpy/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/nxpy", +] From 470204f98aaf00244e2767ba2f18fc4c0ac07422 Mon Sep 17 00:00:00 2001 From: Nicola Musatti Date: Sun, 9 Jun 2024 00:14:03 +0200 Subject: [PATCH 2/5] Make test configuration work under Linux --- bin/install_libs.py | 60 ++++++++++++++++++++++ libs/abstract/pyproject.toml | 11 +++- libs/backup_file/pyproject.toml | 17 ++++-- libs/command/pyproject.toml | 17 ++++-- libs/core/pyproject.toml | 17 ++++-- libs/file/pyproject.toml | 17 ++++-- libs/file_object/pyproject.toml | 17 ++++-- libs/maven/pyproject.toml | 17 ++++-- libs/memo/pyproject.toml | 17 ++++-- libs/nonblocking_subprocess/pyproject.toml | 17 ++++-- libs/past/pyproject.toml | 8 +-- libs/path/pyproject.toml | 8 +-- libs/ply/pyproject.toml | 8 +-- libs/sequence/pyproject.toml | 8 +-- libs/sort/pyproject.toml | 8 +-- libs/svn/pyproject.toml | 8 +-- libs/temp_file/pyproject.toml | 8 +-- libs/test/pyproject.toml | 8 +-- libs/xml/pyproject.toml | 8 +-- pyproject.toml | 11 ++-- test/bin/setup_test_env.py | 2 + tox.ini | 24 +++++---- 22 files changed, 250 insertions(+), 66 deletions(-) create mode 100644 bin/install_libs.py diff --git a/bin/install_libs.py b/bin/install_libs.py new file mode 100644 index 0000000..32532aa --- /dev/null +++ b/bin/install_libs.py @@ -0,0 +1,60 @@ +# nxpy ------------------------------------------------------------------------ + +# Copyright Nicola Musatti 2024 +# Use, modification, and distribution are subject to the Boost Software +# License, Version 1.0. (See accompanying file LICENSE.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +# See https://github.com/nmusatti/nxpy. --------------------------------------- + +r""" +Use pip to install all libraries. + +""" +import os +import subprocess +import sys + +from six import iteritems + +SOURCES = { + 'nxpy_abstract' : 'libs/abstract', + 'nxpy_backup_file' : 'libs/backup_file', + 'nxpy_command' : 'libs/command', + 'nxpy_core' : 'libs/core', + 'nxpy_file' : 'libs/file', + 'nxpy_file_object' : 'libs/file_object', + 'nxpy_maven' : 'libs/maven', + 'nxpy_memo' : 'libs/memo', + 'nxpy_nonblocking_subprocess' : 'libs/nonblocking_subprocess', + 'nxpy_past' : 'libs/past', + 'nxpy_path' : 'libs/path', + 'nxpy_ply' : 'libs/ply', + 'nxpy_sequence' : 'libs/sequence', + 'nxpy_sort' : 'libs/sort', + 'nxpy_svn' : 'libs/svn', + 'nxpy_temp_file' : 'libs/temp_file', + 'nxpy_test' : 'libs/test', + 'nxpy_xml' : 'libs/xml', +} + +def install_libs(sources, develop=False): + print("installing all libs in {} mode".format( + "development" if develop else "normal")) + wd = os.getcwd() + for k, v in iteritems(sources): + try: + os.chdir(os.path.join(wd, v)) + if develop: + subprocess.call([sys.executable, '-m', 'pip', 'install', '-e', '.']) + else: + subprocess.call([sys.executable, '-m', 'pip', 'install', '.']) + except Exception as e: + print("Oops, something went wrong installing", k) + print(e) + finally: + os.chdir(wd) + +if __name__ == '__main__': + develop = len(sys.argv) == 2 and sys.argv[1] in ( "-d", "--develop") + install_libs(SOURCES, develop) diff --git a/libs/abstract/pyproject.toml b/libs/abstract/pyproject.toml index 9e84b92..3e3658b 100644 --- a/libs/abstract/pyproject.toml +++ b/libs/abstract/pyproject.toml @@ -1,3 +1,12 @@ +# nxpy_abstract --------------------------------------------------------------- + +# Copyright Nicola Musatti 2024 +# Use, modification, and distribution are subject to the Boost Software +# License, Version 1.0. (See accompanying file LICENSE.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +# See https://github.com/nmusatti/nxpy/tree/master/libs/abstract. ------------- + [build-system] #requires = ["hatchling"] #build-backend = "hatchling.build" @@ -9,7 +18,7 @@ name = "nxpy-abstract" dynamic = ["version"] description = "Abstract class helpers" readme = "README.rst" -license = "Boost Software License 1.0 (BSL-1.0)" +license.file = "LICENSE.txt" authors = [ { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, ] diff --git a/libs/backup_file/pyproject.toml b/libs/backup_file/pyproject.toml index f884fc3..f397d71 100644 --- a/libs/backup_file/pyproject.toml +++ b/libs/backup_file/pyproject.toml @@ -1,13 +1,24 @@ +# nxpy_backup_file ------------------------------------------------------------ + +# Copyright Nicola Musatti 2024 +# Use, modification, and distribution are subject to the Boost Software +# License, Version 1.0. (See accompanying file LICENSE.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +# See https://github.com/nmusatti/nxpy/tree/master/libs/backup_file. ---------- + [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +#requires = ["hatchling"] +#build-backend = "hatchling.build" +requires = ["setuptools"] +build-backend = "setuptools.build_meta" [project] name = "nxpy-backup-file" dynamic = ["version"] description = "A file-like object that keeps a copy of the file being edited" readme = "README.rst" -license = "Boost Software License 1.0 (BSL-1.0)" +license.file = "LICENSE.txt" authors = [ { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, ] diff --git a/libs/command/pyproject.toml b/libs/command/pyproject.toml index 6a95eb1..6b4b26b 100644 --- a/libs/command/pyproject.toml +++ b/libs/command/pyproject.toml @@ -1,13 +1,24 @@ +# nxpy_command ---------------------------------------------------------------- + +# Copyright Nicola Musatti 2024 +# Use, modification, and distribution are subject to the Boost Software +# License, Version 1.0. (See accompanying file LICENSE.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +# See https://github.com/nmusatti/nxpy/tree/master/libs/command. -------------- + [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +#requires = ["hatchling"] +#build-backend = "hatchling.build" +requires = ["setuptools"] +build-backend = "setuptools.build_meta" [project] name = "nxpy-command" dynamic = ["version"] description = "Wrap programs to call them as Python methods" readme = "README.rst" -license = "Boost Software License 1.0 (BSL-1.0)" +license.file = "LICENSE.txt" authors = [ { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, ] diff --git a/libs/core/pyproject.toml b/libs/core/pyproject.toml index 8a99382..f57da35 100644 --- a/libs/core/pyproject.toml +++ b/libs/core/pyproject.toml @@ -1,13 +1,24 @@ +# nxpy_core ------------------------------------------------------------------- + +# Copyright Nicola Musatti 2024 +# Use, modification, and distribution are subject to the Boost Software +# License, Version 1.0. (See accompanying file LICENSE.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +# See https://github.com/nmusatti/nxpy/tree/master/libs/core. ----------------- + [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +#requires = ["hatchling"] +#build-backend = "hatchling.build" +requires = ["setuptools"] +build-backend = "setuptools.build_meta" [project] name = "nxpy-core" dynamic = ["version"] description = "Infrastructure common to the Nxpy libraries" readme = "README.rst" -license = "Boost Software License 1.0 (BSL-1.0)" +license.file = "LICENSE.txt" authors = [ { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, ] diff --git a/libs/file/pyproject.toml b/libs/file/pyproject.toml index 1e83193..efa007c 100644 --- a/libs/file/pyproject.toml +++ b/libs/file/pyproject.toml @@ -1,13 +1,24 @@ +# nxpy_file ------------------------------------------------------------------- + +# Copyright Nicola Musatti 2024 +# Use, modification, and distribution are subject to the Boost Software +# License, Version 1.0. (See accompanying file LICENSE.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +# See https://github.com/nmusatti/nxpy/tree/master/libs/file. ----------------- + [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +#requires = ["hatchling"] +#build-backend = "hatchling.build" +requires = ["setuptools"] +build-backend = "setuptools.build_meta" [project] name = "nxpy-file" dynamic = ["version"] description = "File manipulation utilities" readme = "README.rst" -license = "Boost Software License 1.0 (BSL-1.0)" +license.file = "LICENSE.txt" authors = [ { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, ] diff --git a/libs/file_object/pyproject.toml b/libs/file_object/pyproject.toml index 708e5bf..dd5ebc0 100644 --- a/libs/file_object/pyproject.toml +++ b/libs/file_object/pyproject.toml @@ -1,13 +1,24 @@ +# nxpy_file_object ------------------------------------------------------------ + +# Copyright Nicola Musatti 2024 +# Use, modification, and distribution are subject to the Boost Software +# License, Version 1.0. (See accompanying file LICENSE.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +# See https://github.com/nmusatti/nxpy/tree/master/libs/file_object. ---------- + [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +#requires = ["hatchling"] +#build-backend = "hatchling.build" +requires = ["setuptools"] +build-backend = "setuptools.build_meta" [project] name = "nxpy-file-object" dynamic = ["version"] description = "Helper classes to implement file-like objects" readme = "README.rst" -license = "Boost Software License 1.0 (BSL-1.0)" +license.file = "LICENSE.txt" authors = [ { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, ] diff --git a/libs/maven/pyproject.toml b/libs/maven/pyproject.toml index 4b3119b..36aa202 100644 --- a/libs/maven/pyproject.toml +++ b/libs/maven/pyproject.toml @@ -1,13 +1,24 @@ +# nxpy_maven ------------------------------------------------------------------ + +# Copyright Nicola Musatti 2024 +# Use, modification, and distribution are subject to the Boost Software +# License, Version 1.0. (See accompanying file LICENSE.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +# See https://github.com/nmusatti/nxpy/tree/master/libs/maven. ---------------- + [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +#requires = ["hatchling"] +#build-backend = "hatchling.build" +requires = ["setuptools"] +build-backend = "setuptools.build_meta" [project] name = "nxpy-maven" dynamic = ["version"] description = "Utilities for the Maven build tool" readme = "README.rst" -license = "Boost Software License 1.0 (BSL-1.0)" +license.file = "LICENSE.txt" authors = [ { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, ] diff --git a/libs/memo/pyproject.toml b/libs/memo/pyproject.toml index 6ae718d..c42fcb5 100644 --- a/libs/memo/pyproject.toml +++ b/libs/memo/pyproject.toml @@ -1,13 +1,24 @@ +# nxpy_memo ------------------------------------------------------------------- + +# Copyright Nicola Musatti 2024 +# Use, modification, and distribution are subject to the Boost Software +# License, Version 1.0. (See accompanying file LICENSE.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +# See https://github.com/nmusatti/nxpy/tree/master/libs/memo. ----------------- + [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +#requires = ["hatchling"] +#build-backend = "hatchling.build" +requires = ["setuptools"] +build-backend = "setuptools.build_meta" [project] name = "nxpy-memo" dynamic = ["version"] description = "Base class to implement self-memoizing types" readme = "README.rst" -license = "Boost Software License 1.0 (BSL-1.0)" +license.file = "LICENSE.txt" authors = [ { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, ] diff --git a/libs/nonblocking_subprocess/pyproject.toml b/libs/nonblocking_subprocess/pyproject.toml index b20bfb1..c55a51c 100644 --- a/libs/nonblocking_subprocess/pyproject.toml +++ b/libs/nonblocking_subprocess/pyproject.toml @@ -1,13 +1,24 @@ +# nxpy_nonblocking_subprocess ------------------------------------------------- + +# Copyright Nicola Musatti 2024 +# Use, modification, and distribution are subject to the Boost Software +# License, Version 1.0. (See accompanying file LICENSE.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +# See https://github.com/nmusatti/nxpy/tree/master/libs/nonblocking_subprocess. + [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +#requires = ["hatchling"] +#build-backend = "hatchling.build" +requires = ["setuptools"] +build-backend = "setuptools.build_meta" [project] name = "nxpy-nonblocking-subprocess" dynamic = ["version"] description = "subprocess.Popen subclass using non-blocking I/O" readme = "README.rst" -license = "Boost Software License 1.0 (BSL-1.0)" +license.file = "LICENSE.txt" authors = [ { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, ] diff --git a/libs/past/pyproject.toml b/libs/past/pyproject.toml index 61f4230..b07f12d 100644 --- a/libs/past/pyproject.toml +++ b/libs/past/pyproject.toml @@ -1,13 +1,15 @@ [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +#requires = ["hatchling"] +#build-backend = "hatchling.build" +requires = ["setuptools"] +build-backend = "setuptools.build_meta" [project] name = "nxpy-past" dynamic = ["version"] description = "Python version based conditionals" readme = "README.rst" -license = "Boost Software License 1.0 (BSL-1.0)" +license.file = "LICENSE.txt" authors = [ { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, ] diff --git a/libs/path/pyproject.toml b/libs/path/pyproject.toml index 6de9ce2..0d148a6 100644 --- a/libs/path/pyproject.toml +++ b/libs/path/pyproject.toml @@ -1,13 +1,15 @@ [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +#requires = ["hatchling"] +#build-backend = "hatchling.build" +requires = ["setuptools"] +build-backend = "setuptools.build_meta" [project] name = "nxpy-path" dynamic = ["version"] description = "Wrap programs to call them as Python methods" readme = "README.rst" -license = "Boost Software License 1.0 (BSL-1.0)" +license.file = "LICENSE.txt" authors = [ { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, ] diff --git a/libs/ply/pyproject.toml b/libs/ply/pyproject.toml index 7be5668..5765c89 100644 --- a/libs/ply/pyproject.toml +++ b/libs/ply/pyproject.toml @@ -1,13 +1,15 @@ [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +#requires = ["hatchling"] +#build-backend = "hatchling.build" +requires = ["setuptools"] +build-backend = "setuptools.build_meta" [project] name = "nxpy-ply" dynamic = ["version"] description = "Utilities for the PLY parser generator" readme = "README.rst" -license = "Boost Software License 1.0 (BSL-1.0)" +license.file = "LICENSE.txt" authors = [ { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, ] diff --git a/libs/sequence/pyproject.toml b/libs/sequence/pyproject.toml index 01fa0b7..ef37746 100644 --- a/libs/sequence/pyproject.toml +++ b/libs/sequence/pyproject.toml @@ -1,13 +1,15 @@ [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +#requires = ["hatchling"] +#build-backend = "hatchling.build" +requires = ["setuptools"] +build-backend = "setuptools.build_meta" [project] name = "nxpy-sequence" dynamic = ["version"] description = "Sequence related tools" readme = "README.rst" -license = "Boost Software License 1.0 (BSL-1.0)" +license.file = "LICENSE.txt" authors = [ { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, ] diff --git a/libs/sort/pyproject.toml b/libs/sort/pyproject.toml index a9a3d8c..dfbea63 100644 --- a/libs/sort/pyproject.toml +++ b/libs/sort/pyproject.toml @@ -1,13 +1,15 @@ [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +#requires = ["hatchling"] +#build-backend = "hatchling.build" +requires = ["setuptools"] +build-backend = "setuptools.build_meta" [project] name = "nxpy-sort" dynamic = ["version"] description = "Sorting utilities" readme = "README.rst" -license = "Boost Software License 1.0 (BSL-1.0)" +license.file = "LICENSE.txt" authors = [ { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, ] diff --git a/libs/svn/pyproject.toml b/libs/svn/pyproject.toml index 71c227b..550d0ea 100644 --- a/libs/svn/pyproject.toml +++ b/libs/svn/pyproject.toml @@ -1,13 +1,15 @@ [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +#requires = ["hatchling"] +#build-backend = "hatchling.build" +requires = ["setuptools"] +build-backend = "setuptools.build_meta" [project] name = "nxpy-svn" dynamic = ["version"] description = "Python wrapper for Subversion" readme = "README.rst" -license = "Boost Software License 1.0 (BSL-1.0)" +license.file = "LICENSE.txt" authors = [ { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, ] diff --git a/libs/temp_file/pyproject.toml b/libs/temp_file/pyproject.toml index 4addb74..4c694cf 100644 --- a/libs/temp_file/pyproject.toml +++ b/libs/temp_file/pyproject.toml @@ -1,13 +1,15 @@ [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +#requires = ["hatchling"] +#build-backend = "hatchling.build" +requires = ["setuptools"] +build-backend = "setuptools.build_meta" [project] name = "nxpy-temp-file" dynamic = ["version"] description = "Temporary file and directory handling" readme = "README.rst" -license = "Boost Software License 1.0 (BSL-1.0)" +license.file = "LICENSE.txt" authors = [ { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, ] diff --git a/libs/test/pyproject.toml b/libs/test/pyproject.toml index c98177d..ce51a9e 100644 --- a/libs/test/pyproject.toml +++ b/libs/test/pyproject.toml @@ -1,13 +1,15 @@ [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +#requires = ["hatchling"] +#build-backend = "hatchling.build" +requires = ["setuptools"] +build-backend = "setuptools.build_meta" [project] name = "nxpy-test" dynamic = ["version"] description = "Test related utilities for the Nxpy libraries" readme = "README.rst" -license = "Boost Software License 1.0 (BSL-1.0)" +license.file = "LICENSE.txt" authors = [ { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, ] diff --git a/libs/xml/pyproject.toml b/libs/xml/pyproject.toml index 8ba9470..47e73da 100644 --- a/libs/xml/pyproject.toml +++ b/libs/xml/pyproject.toml @@ -1,13 +1,15 @@ [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +#requires = ["hatchling"] +#build-backend = "hatchling.build" +requires = ["setuptools"] +build-backend = "setuptools.build_meta" [project] name = "nxpy-xml" dynamic = ["version"] description = "Utilities for the Lxml library" readme = "README.rst" -license = "Boost Software License 1.0 (BSL-1.0)" +license.file = "LICENSE.txt" authors = [ { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, ] diff --git a/pyproject.toml b/pyproject.toml index beda8a3..8259f0d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,18 @@ [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +#requires = ["hatchling"] +#build-backend = "hatchling.build" +requires = [ + "setuptools", + "six" +] +build-backend = "setuptools.build_meta" [project] name = "Nxpy" dynamic = ["version"] description = "Nick's Python Toolbox" readme = "README.rst" -license = "Boost Software License 1.0 (BSL-1.0)" +license.file = "LICENSE.txt" authors = [ { name = "Nicola Musatti", email = "nicola.musatti@gmail.com" }, ] diff --git a/test/bin/setup_test_env.py b/test/bin/setup_test_env.py index 1108c0e..0ae9aa0 100644 --- a/test/bin/setup_test_env.py +++ b/test/bin/setup_test_env.py @@ -43,6 +43,8 @@ def main(msgs=False): except KeyError: env_dir = "" base_dest_dir = "" + if len(sys.argv) == 2: + env_dir = sys.argv[1] if msgs: base_dest_dir = input("Test data directory [" + env_dir + "]: ") six.print_("Directory:", base_dest_dir) diff --git a/tox.ini b/tox.ini index 1f2bb33..3c09490 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 4.0 -envlist = py{27,37,38,39,310,311}-{mylinux,mymacos,mywindows} +envlist = py{27,38,39,310,311,312}-{mylinux,mymacos,mywindows} [testenv] platform = @@ -8,17 +8,18 @@ platform = mymacos: darwin mywindows: win32 -setenv = - mylinux,mymacos: NXPY_TEST_DIR = {toxinidir}/tmp/nxpy - mywindows: NXPY_TEST_DIR = {toxinidir}\tmp\nxpy +set_env = + mylinux, mymacos: NXPY_TEST_DIR={toxinidir}/tmp/nxpy + mywindows: NXPY_TEST_DIR={toxinidir}\tmp\nxpy -passenv = +pass_env = JAVA_HOME - mywindows: USERNAME M2_HOME + mywindows: USERNAME allowlist_externals = mkdir + mvn deps = pytest @@ -26,8 +27,9 @@ deps = six commands = - pip install -e . - mylinux,mymacos: -mkdir -p {toxinidir}/tmp/nxpy - mywindows: -mkdir {toxinidir}\tmp\nxpy - python test/bin/setup_test_env.py - python -m pytest --color=yes libs -s + python bin/install_libs.py -d + mylinux, mymacos: -mkdir -p {toxinidir}/tmp/nxpy + mywindows: -mkdir -p {toxinidir}\tmp\nxpy + mylinux, mymacos: python test/bin/setup_test_env.py + mywindows: python test/bin/setup_test_env.py + python -m pytest --color=yes libs -s From ea67346064e534aa3f872d26d95233f323cd0274 Mon Sep 17 00:00:00 2001 From: Nicola Musatti Date: Sun, 9 Jun 2024 00:17:17 +0200 Subject: [PATCH 3/5] Upgrade test action --- .github/workflows/test.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f6fa872..90d056e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,16 +7,10 @@ name: test jobs: test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: matrix: version: - - github: 2.7 - tox: py27 - cmd: python - - github: 3.6 - tox: py36 - cmd: python3 - github: 3.7 tox: py37 cmd: python3 @@ -29,9 +23,15 @@ jobs: - github: "3.10" tox: py310 cmd: python3 + - github: "3.11" + tox: py311 + cmd: python3 + - github: "3.12" + tox: py312 + cmd: python3 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.version.github }} - run: | From 28635399d235b0fb3e1b16133fe06c89754d5f5c Mon Sep 17 00:00:00 2001 From: Nicola Musatti Date: Sun, 9 Jun 2024 11:53:32 +0200 Subject: [PATCH 4/5] Remove top level setup files --- pyproject.toml | 27 +++++++--- setup.cfg | 5 -- setup.py | 130 ------------------------------------------------- 3 files changed, 21 insertions(+), 141 deletions(-) delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml index 8259f0d..adf58ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,10 +38,25 @@ dependencies = [ Documentation = "https://nxpy.readthedocs.io/en/latest/" "Source Code" = "https://github.com/nmusatti/nxpy" -[tool.hatch.version] -path = "nxpy/__init__.py" +[tool.setuptools] +include-package-data = true -[tool.hatch.build.targets.sdist] -include = [ - "/nxpy", -] +[tool.setuptools.package-dir] +nxpy_abstract = "libs/abstract" +nxpy_backup_file = "libs/backup_file" +nxpy_command = "libs/command" +nxpy_core = "libs/core" +nxpy_file = "libs/file" +nxpy_file_object = "libs/file_object" +nxpy_maven = "libs/maven" +nxpy_memo = "libs/memo" +nxpy_nonblocking_subprocess = "libs/nonblocking_subprocess" +nxpy_past = "libs/past" +nxpy_path = "libs/path" +nxpy_ply = "libs/ply" +nxpy_sequence = "libs/sequence" +nxpy_sort = "libs/sort" +nxpy_svn = "libs/svn" +nxpy_temp_file = "libs/temp_file" +nxpy_test = "libs/test" +nxpy_xml = "libs/xml" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index d819091..0000000 --- a/setup.cfg +++ /dev/null @@ -1,5 +0,0 @@ -[metadata] -license_files=LICENSE.txt - -[bdist_wheel] -universal=1 diff --git a/setup.py b/setup.py deleted file mode 100644 index b5b198d..0000000 --- a/setup.py +++ /dev/null @@ -1,130 +0,0 @@ -# nxpy ------------------------------------------------------------------------ - -# Copyright Nicola Musatti 2018 - 2022 -# Use, modification, and distribution are subject to the Boost Software -# License, Version 1.0. (See accompanying file LICENSE.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) - -# See https://github.com/nmusatti/nxpy. --------------------------------------- - -r""" -Packaging information. - -Note that this setup is only used for development and testing. -A single package including all the libraries is not currently available. - -""" - -from __future__ import absolute_import - -import codecs -import os -import subprocess -import sys - -from six import iteritems - -from setuptools import setup -from setuptools.command.develop import develop -from setuptools.command.install import install -from setuptools.command.egg_info import egg_info - -PACKAGE_NAME = 'Nxpy' -SOURCES = { - 'nxpy_abstract' : 'libs/abstract', - 'nxpy_backup_file' : 'libs/backup_file', - 'nxpy_command' : 'libs/command', - 'nxpy_core' : 'libs/core', - 'nxpy_file' : 'libs/file', - 'nxpy_file_object' : 'libs/file_object', - 'nxpy_maven' : 'libs/maven', - 'nxpy_memo' : 'libs/memo', - 'nxpy_nonblocking_subprocess' : 'libs/nonblocking_subprocess', - 'nxpy_past' : 'libs/past', - 'nxpy_path' : 'libs/path', - 'nxpy_ply' : 'libs/ply', - 'nxpy_sequence' : 'libs/sequence', - 'nxpy_sort' : 'libs/sort', - 'nxpy_svn' : 'libs/svn', - 'nxpy_temp_file' : 'libs/temp_file', - 'nxpy_test' : 'libs/test', - 'nxpy_xml' : 'libs/xml', -} - -def install_libs(sources, develop=False): - """ Use pip to install all libraries. """ - print("installing all libs in {} mode".format( - "development" if develop else "normal")) - wd = os.getcwd() - for k, v in iteritems(sources): - try: - os.chdir(os.path.join(wd, v)) - if develop: - subprocess.call([sys.executable, '-m', 'pip', 'install', '-e', '.']) - else: - subprocess.call([sys.executable, '-m', 'pip', 'install', '.']) - except Exception as e: - print("Oops, something went wrong installing", k) - print(e) - finally: - os.chdir(wd) - -class DevelopCmd(develop): - """ Add custom steps for the develop command """ - def run(self): - install_libs(SOURCES, develop=True) - develop.run(self) - -class InstallCmd(install): - """ Add custom steps for the install command """ - def run(self): -# install_libs(SOURCES, develop=False) - install.run(self) - -class EggInfoCmd(egg_info): - """ Add custom steps for the egg-info command """ - def run(self): -# install_libs(SOURCES, develop=True) - egg_info.run(self) - -here = os.path.abspath(os.path.dirname(__file__)) - -with codecs.open(os.path.join(here,'README.rst'), encoding='utf-8') as f: - long_description = f.read() - -setup( - name=PACKAGE_NAME, - version="1.0.7", - author="Nicola Musatti", - author_email="nicola.musatti@gmail.com", - description = "Nick's Python Toolbox", - long_description = long_description, - project_urls={ - "Documentation": "https://nxpy.readthedocs.io/en/latest/", - "Source Code": "https://github.com/nmusatti/nxpy", - }, - license="Boost Software License 1.0 (BSL-1.0)", - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: Boost Software License 1.0 (BSL-1.0)', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Topic :: Software Development :: Libraries', - ], - package_dir=SOURCES, - install_requires=[ - 'six', - ], - cmdclass={ - 'install': InstallCmd, - 'develop': DevelopCmd, - 'egg_info': EggInfoCmd, - }, -) \ No newline at end of file From dd78b5564be622f09ba4cac23644b9322e1162e9 Mon Sep 17 00:00:00 2001 From: Nicola Musatti Date: Mon, 10 Jun 2024 22:37:24 +0200 Subject: [PATCH 5/5] Remove 2.7 from matrix and contract platform names --- .github/workflows/test.yml | 2 +- tox.ini | 36 ++++++++++++++++++------------------ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 90d056e..1e2d7ba 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,4 +38,4 @@ jobs: ${{ matrix.version.cmd }} -m pip install --upgrade pip ${{ matrix.version.cmd }} -m pip install tox - run: | - tox -e ${{ matrix.version.tox }}-mylinux + tox -e ${{ matrix.version.tox }}-lnx diff --git a/tox.ini b/tox.ini index 3c09490..a0b3c1e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,35 +1,35 @@ [tox] minversion = 4.0 -envlist = py{27,38,39,310,311,312}-{mylinux,mymacos,mywindows} +envlist = py{38,39,310,311,312}-{lnx,mac,win} [testenv] platform = - mylinux: linux - mymacos: darwin - mywindows: win32 + lnx: linux + mac: darwin + win: win32 set_env = - mylinux, mymacos: NXPY_TEST_DIR={toxinidir}/tmp/nxpy - mywindows: NXPY_TEST_DIR={toxinidir}\tmp\nxpy + lnx, mac: NXPY_TEST_DIR={toxinidir}/tmp/nxpy + win: NXPY_TEST_DIR={toxinidir}\tmp\nxpy pass_env = - JAVA_HOME - M2_HOME - mywindows: USERNAME + JAVA_HOME + M2_HOME + win: USERNAME allowlist_externals = - mkdir - mvn + mkdir + mvn deps = - pytest - pytest-cov - six + pytest + pytest-cov + six commands = python bin/install_libs.py -d - mylinux, mymacos: -mkdir -p {toxinidir}/tmp/nxpy - mywindows: -mkdir -p {toxinidir}\tmp\nxpy - mylinux, mymacos: python test/bin/setup_test_env.py - mywindows: python test/bin/setup_test_env.py + lnx, mac: -mkdir -p {toxinidir}/tmp/nxpy + win: -mkdir -p {toxinidir}\tmp\nxpy + lnx, mac: python test/bin/setup_test_env.py + win: python test/bin/setup_test_env.py python -m pytest --color=yes libs -s