From 4de49f6bedd0f5fb29db6485ce412e4fcc780039 Mon Sep 17 00:00:00 2001 From: batman feynman Date: Tue, 14 Dec 2021 22:49:25 +0530 Subject: [PATCH 1/2] modernised python packaging --- pyproject.toml | 6 +++++ setup.cfg | 61 ++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 63 ++------------------------------------------------ 3 files changed, 69 insertions(+), 61 deletions(-) create mode 100644 pyproject.toml create mode 100644 setup.cfg diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..bb45ba7 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,6 @@ +[build-system] +requires = [ + "setuptools>=51.0.0", + "wheel" +] +build-backend = "setuptools.build_meta" diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..cfb2c2c --- /dev/null +++ b/setup.cfg @@ -0,0 +1,61 @@ +[metadata] +name = syncplay +version = attr: syncplay.version +author = Syncplay +author_email = dev@syncplay.pl +description = Client/server to synchronize media playback on mpv/VLC/MPC-HC/MPC-BE across many computers +long_description = file: README.md +long_description_content_type = text/markdown +url = https://syncplay.pl/ +download_url = https://syncplay.pl/download/ +project_urls = + Source Code = https://github.com/Syncplay/syncplay + Bug Tracker = https://github.com/Syncplay/syncplay/issues +license_file = LICENSE +classifiers = + Development Status :: 5 - Production/Stable + Environment :: MacOS X :: Cocoa + Environment :: Win32 (MS Windows) + Environment :: X11 Applications :: Qt + Framework :: Twisted + Intended Audience :: End Users/Desktop + License :: OSI Approved :: Apache Software License + Operating System :: MacOS :: MacOS X + Operating System :: Microsoft :: Windows + Operating System :: POSIX :: Linux + Natural Language :: English + Natural Language :: German + Natural Language :: Italian + Natural Language :: Russian + Natural Language :: Spanish + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.4 + Programming Language :: Python :: 3.5 + 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 + Programming Language :: Python :: 3 :: Only + Topic :: Internet + Topic :: Multimedia :: Video + +[options] +include_package_data = True +packages = find: +install_requires = + twisted[tls]>=16.4.0 + certifi>=2018.11.29 + appnope>=0.1.0; sys_platform == 'darwin' + pypiwin32>=223; sys_platform == 'win32' + zope.interface>=4.4.0; sys_platform == 'win32' + pyside2>=5.11.0 + requests>=2.20.0; sys_platform == 'darwin' +python_requires = >=3.4 + +[options.entry_points] +console_scripts = + syncplay-server = syncplay.ep_server:main +gui_scripts = + syncplay = syncplay.ep_client:main + diff --git a/setup.py b/setup.py index 63bfc57..2145c50 100644 --- a/setup.py +++ b/setup.py @@ -1,65 +1,6 @@ #!/usr/bin/env python3 -import os -import setuptools +from setuptools import setup +setup() -from syncplay import projectURL, version as syncplay_version -def read(fname): - with open(fname, 'r') as f: - return f.read() - -installRequirements = read('requirements.txt').splitlines() +\ - read('requirements_gui.txt').splitlines() - -setuptools.setup( - name="syncplay", - version=syncplay_version, - author="Syncplay", - author_email="dev@syncplay.pl", - description=' '.join([ - 'Client/server to synchronize media playback', - 'on mpv/VLC/MPC-HC/MPC-BE on many computers' - ]), - long_description=read('README.md'), - long_description_content_type="text/markdown", - url=projectURL, - download_url=projectURL + 'download/', - packages=setuptools.find_packages(), - install_requires=installRequirements, - python_requires=">=3.4", - entry_points={ - 'console_scripts': [ - 'syncplay-server = syncplay.ep_server:main', - ], - 'gui_scripts': [ - 'syncplay = syncplay.ep_client:main', - ] - }, - include_package_data=True, - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Environment :: MacOS X :: Cocoa", - "Environment :: Win32 (MS Windows)", - "Environment :: X11 Applications :: Qt", - "Framework :: Twisted", - "Intended Audience :: End Users/Desktop", - "License :: OSI Approved :: Apache Software License", - "Operating System :: MacOS :: MacOS X", - "Operating System :: Microsoft :: Windows", - "Operating System :: POSIX :: Linux", - "Natural Language :: English", - "Natural Language :: German", - "Natural Language :: Italian", - "Natural Language :: Russian", - "Natural Language :: Spanish", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Topic :: Internet", - "Topic :: Multimedia :: Video" - ], -) From 5acffbefa3056d3988f210eaec3da76f5648312d Mon Sep 17 00:00:00 2001 From: batman feynman Date: Wed, 15 Dec 2021 10:33:37 +0530 Subject: [PATCH 2/2] updated python version support and requirements ordering --- setup.cfg | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/setup.cfg b/setup.cfg index cfb2c2c..3993155 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,8 +29,6 @@ classifiers = Natural Language :: Russian Natural Language :: Spanish Programming Language :: Python :: 3 - Programming Language :: Python :: 3.4 - Programming Language :: Python :: 3.5 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 @@ -44,14 +42,14 @@ classifiers = include_package_data = True packages = find: install_requires = - twisted[tls]>=16.4.0 - certifi>=2018.11.29 appnope>=0.1.0; sys_platform == 'darwin' + certifi>=2018.11.29 pypiwin32>=223; sys_platform == 'win32' - zope.interface>=4.4.0; sys_platform == 'win32' pyside2>=5.11.0 requests>=2.20.0; sys_platform == 'darwin' -python_requires = >=3.4 + twisted[tls]>=16.4.0 + zope.interface>=4.4.0; sys_platform == 'win32' +python_requires = >=3.6 [options.entry_points] console_scripts =