1
0
mirror of https://github.com/gryf/fs-uae-wrapper.git synced 2025-12-20 04:48:02 +01:00

Move to pyproject.

This commit is contained in:
2024-09-11 19:48:06 +02:00
parent 68b1f2a787
commit 60139d1728
5 changed files with 44 additions and 49 deletions

40
pyproject.toml Normal file
View File

@@ -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

View File

@@ -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

View File

@@ -1,5 +0,0 @@
#!/usr/bin/env python
import setuptools
setuptools.setup()

View File

@@ -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')

View File

@@ -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')