diff --git a/0001-add-setup.py.patch b/0001-add-setup.py.patch new file mode 100644 index 0000000000000000000000000000000000000000..5bac3ce791970bc8f169947fec01f19525d41748 --- /dev/null +++ b/0001-add-setup.py.patch @@ -0,0 +1,133 @@ +From 612b03bbfa18d2730e341e87705cb1e018d65e0f Mon Sep 17 00:00:00 2001 +From: liqiuyu123 +Date: Tue, 8 Nov 2022 15:44:40 +0800 +Subject: [PATCH] add setup.py + +--- + setup.py | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 114 insertions(+) + create mode 100644 setup.py + +diff --git a/setup.py b/setup.py +new file mode 100644 +index 0000000..f0bbbc7 +--- /dev/null ++++ b/setup.py +@@ -0,0 +1,114 @@ ++import os ++import subprocess ++import sys ++ ++import setuptools ++from setuptools.command.develop import develop ++ ++ ++def get_static_version(): ++ """Read manually attributed version number. ++ ++ Note: the version number only changes when releases are made.""" ++ with open('liquidctl/version.py', 'r') as fv: ++ vals = {} ++ exec(fv.read(), vals) ++ return vals['__version__'] ++ ++ ++def make_pypi_long_description(doc_url): ++ """Generate custom long description for PyPI.""" ++ with open('README.md', 'r', encoding='utf-8') as fh: ++ continuation = ('For which devices are supported, installation instructions, ' ++ 'a guide to the CLI and device specific details, check the ' ++ 'complete [Documentation]({}).').format(doc_url) ++ long_description = (fh.read().split('', 1)[0] ++ + continuation) ++ return long_description ++ ++ ++def get_git_version(): ++ """Check that `git` is accessible and return its version.""" ++ try: ++ return subprocess.check_output(['git', '--version']).strip().decode() ++ except: ++ return None ++ ++ ++def make_extraversion(editable=False): ++ """Compile extra version information for use at runtime. ++ ++ Additional information will include: ++ - values of DIST_NAME and DIST_PACKAGE environment variables ++ - whether the installation is running in develop/editable mode ++ - git HEAD commit hash and whether the tree is dirty ++ """ ++ extra = {} ++ extra['dist_name'] = os.getenv('DIST_NAME') ++ extra['dist_package'] = os.getenv('DIST_PACKAGE') ++ extra['editable'] = editable ++ if get_git_version() and os.path.isdir('.git'): ++ rev_parse = subprocess.check_output(['git', 'rev-parse', 'HEAD']).strip().decode() ++ describe = subprocess.check_output(['git', 'describe', '--always', '--dirty']).strip().decode() ++ extra['commit'] = rev_parse ++ extra['dirty'] = describe.endswith('-dirty') ++ with open('liquidctl/extraversion.py', 'w') as fv: ++ fv.write('__extraversion__ = {!r}'.format(extra)) ++ ++ ++class custom_develop(develop): ++ def run(self): ++ make_extraversion(editable=True) ++ super().run() ++ ++ ++HOME = 'https://github.com/liquidctl/liquidctl' ++VERSION = get_static_version() ++SUPPORTED_URL = '{}/tree/v{}#supported-devices'.format(HOME, VERSION) ++DOC_URL = '{}/tree/v{}#liquidctl--liquid-cooler-control'.format(HOME, VERSION) ++CHANGES_URL = '{}/blob/v{}/CHANGELOG.md'.format(HOME, VERSION) ++ ++make_extraversion() ++ ++install_requires = ['docopt', 'pyusb', 'hidapi', 'colorlog'] ++ ++if sys.platform == 'linux': ++ install_requires.append('smbus') ++ ++setuptools.setup( ++ name='liquidctl', ++ cmdclass={'develop': custom_develop}, ++ version=VERSION, ++ author='Jonas Malaco', ++ author_email='jonas@protocubo.io', ++ description='Cross-platform tool and drivers for liquid coolers and other devices', ++ long_description=make_pypi_long_description(DOC_URL), ++ long_description_content_type='text/markdown', ++ url=HOME, ++ packages=setuptools.find_packages(), ++ classifiers=[ ++ 'Development Status :: 5 - Production/Stable', ++ 'Intended Audience :: End Users/Desktop', ++ 'Intended Audience :: Developers', ++ 'Topic :: System :: Hardware :: Hardware Drivers', ++ 'Operating System :: OS Independent', ++ 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', ++ 'Programming Language :: Python :: 3.6', ++ 'Programming Language :: Python :: 3.7', ++ 'Programming Language :: Python :: 3.8', ++ ], ++ keywords='cross-platform cli driver corsair evga nzxt liquid-cooler fan-controller ' ++ 'power-supply led-controller kraken smart-device hue2 gigabyte', ++ project_urls={ ++ 'Supported devices': SUPPORTED_URL, ++ 'Documentation': DOC_URL, ++ 'Changelog': CHANGES_URL, ++ }, ++ install_requires=install_requires, ++ python_requires='>=3.6', ++ entry_points={ ++ 'console_scripts': [ ++ 'liquidctl=liquidctl.cli:main', ++ ], ++ }, ++) +-- +2.37.1.windows.1 + diff --git a/liquidctl-1.11.1.tar.gz b/liquidctl-1.11.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..943176c6b42458a8df12a4c7fdd6a95c2dedf77e Binary files /dev/null and b/liquidctl-1.11.1.tar.gz differ diff --git a/liquidctl-1.7.2.tar.gz b/liquidctl-1.7.2.tar.gz deleted file mode 100644 index f7f4edf7047661e97867b4fe58f1106a07743061..0000000000000000000000000000000000000000 Binary files a/liquidctl-1.7.2.tar.gz and /dev/null differ diff --git a/python-liquidctl.spec b/python-liquidctl.spec index 0838ac3318164c23ea28819a431a79c13b47db83..31af8549f525a91d800648b386f70ac605d8b8ea 100644 --- a/python-liquidctl.spec +++ b/python-liquidctl.spec @@ -1,13 +1,23 @@ %global _empty_manifest_terminate_build 0 Name: python-liquidctl -Version: 1.7.2 +Version: 1.11.1 Release: 1 Summary: Cross-platform tool and drivers for liquid coolers and other devices License: GPL-3.0-only URL: https://github.com/liquidctl/liquidctl -Source0: https://files.pythonhosted.org/packages/e4/f5/745cc14e5748de5d5ac3ccc1a0a9ee5e0e73858aafcc863514ce88956c0b/liquidctl-1.7.2.tar.gz +Source0: https://files.pythonhosted.org/packages/7d/61/e3cfc5e1cb8f711a6da0fe813a01c01b793c594a401c3c579fc0a0e41027/liquidctl-1.11.1.tar.gz +Patch0: 0001-add-setup.py.patch BuildArch: noarch +Requires: python3-colorlog +Requires: python3-crcmod +Requires: python3-docopt +Requires: python3-hidapi +Requires: python3-pyusb +Requires: python3-pillow +Requires: python3-smbus +Requires: python3-winusbcdc +Requires: python3-libusb-package %description Cross-platform tool and drivers for liquid coolers and other devices @@ -17,6 +27,7 @@ Summary: Cross-platform tool and drivers for liquid coolers and other devices Provides: python-liquidctl BuildRequires: python3-devel BuildRequires: python3-setuptools +BuildRequires: python3-pip %description -n python3-liquidctl Cross-platform tool and drivers for liquid coolers and other devices @@ -27,7 +38,8 @@ Provides: python3-liquidctl-doc Cross-platform tool and drivers for liquid coolers and other devices %prep -%autosetup -n liquidctl-1.7.2 +%autosetup -n liquidctl-%{version} +%patch0 %build %py3_build @@ -67,6 +79,9 @@ mv %{buildroot}/doclist.lst . %{_docdir}/* %changelog +* Tue Nov 08 2022 liqiuyu - 1.11.1-1 +- Upgrade package to version 1.11.1 + * Mon Dec 20 2021 Python_Bot - 1.7.2-1 - Package Init