diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..f6b05ae --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,40 @@ +[build-system] +requires = ["setuptools >= 61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "fs-uae-wrapper" +authors = [{name = "Roman Dobosz", email = "gryf73@gmail.com"}] +license = {text = "BSD"} +description = "Automate archives support and state saves for fs-uae" +readme = "README.rst" +requires-python = ">=3.8" +keywords = ["uae", "fs-uae", "amiga", "emulator", "wrapper"] +version = "0.9.0" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Intended Audience :: End Users/Desktop", + "License :: OSI Approved :: BSD License", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: System :: Emulators", + "Topic :: Games/Entertainment" +] + +[project.urls] +Homepage = "https://github.com/gryf/fs-uae-wrapper" + +[project.scripts] +fs-uae-wrapper = "fs_uae_wrapper.wrapper:run" + +[tool.setuptools] +py-modules = ["fs_uae_wrapper"] + +[tool.distutils.bdist_wheel] +universal = true diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index faa1faa..0000000 --- a/setup.cfg +++ /dev/null @@ -1,37 +0,0 @@ -[metadata] -name = fs-uae-wrapper -summary = Automate archives and state for fs-uae -description = Automate archives and state for fs-uae -long_description = file: README.rst -author = Roman Dobosz -author_email = gryf73@gmail.com -url = https://github.com/gryf/fs-uae-wrapper -license = BSD -keywords = uae, fs-uae, amiga, emulator, wrapper -version = 0.8.3 -classifier = - Development Status :: 5 - Production/Stable - Environment :: Console - Intended Audience :: End Users/Desktop - License :: OSI Approved :: BSD License - Operating System :: OS Independent - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Topic :: System :: Emulators - Topic :: Games/Entertainment - -[install] -record = install.log - -[options.entry_points] -console_scripts = - fs-uae-wrapper = fs_uae_wrapper.wrapper:run - -[files] -packages = - fs_uae_wrapper - -[bdist_wheel] -universal = 1 diff --git a/setup.py b/setup.py deleted file mode 100755 index c52b075..0000000 --- a/setup.py +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env python -import setuptools - - -setuptools.setup() diff --git a/tests/test_utils.py b/tests/test_utils.py index 4537047..fb74b34 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -237,8 +237,8 @@ class TestCmdOptions(TestCase): @mock.patch('os.path.exists') @mock.patch('os.getenv') @mock.patch('os.path.expandvars') - @mock.patch('distutils.spawn.find_executable') - def test_interpolate_variables(self, find_exe, expandv, getenv, os_exists): + @mock.patch('shutil.which') + def test_interpolate_variables(self, which, expandv, getenv, os_exists): os_exists.return_value = True itrpl = utils.interpolate_variables @@ -252,7 +252,7 @@ class TestCmdOptions(TestCase): '/home/user') string = '$APP/$EXE' - find_exe.return_value = '/usr/bin/fs-uae' + which.return_value = '/usr/bin/fs-uae' self.assertEqual(itrpl(string, '/home/user/Config.fs-uae'), '/usr/bin/fs-uae//usr/bin/fs-uae') diff --git a/tests/test_wrapper.py b/tests/test_wrapper.py index 10cd0cc..4ec2795 100644 --- a/tests/test_wrapper.py +++ b/tests/test_wrapper.py @@ -47,10 +47,7 @@ class TestWrapper(TestCase): fobj.write('\n') wrapper.run() - mock_plain_run.called_once_with('Config.fs-uae', - ['--fullscreen', - '--fade_out_duration=0'], - []) + mock_plain_run.assert_called_once() # This will obviously fail for nonexistent module sys.argv.append('--wrapper=dummy_wrapper')