Skip to content

Commit

Permalink
Port setup metadata from legacy setup.py to declarative setup.cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
CAM-Gerlach committed Nov 1, 2021
1 parent 153a7b2 commit 3f7bf6b
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 53 deletions.
4 changes: 2 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ To release a new version of qtpy on PyPI:

loghub -m vX.X.X spyder-ide/qtpy

* Update `_version.py` (set release version, remove 'dev0')
* Update `__version__` in `__init__.py` (set release version, remove 'dev0')

* git add . && git commit -m 'Release X.X.X'

Expand All @@ -22,7 +22,7 @@ To release a new version of qtpy on PyPI:

* git tag -a vX.X.X -m 'Release X.X.X'

* Update `_version.py` (add 'dev0' and increment minor)
* Update `__version__` in `__init__.py` (add 'dev0' and increment minor)

* git add . && git commit -m 'Back to work'

Expand Down
2 changes: 1 addition & 1 deletion qtpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
import warnings

# Version of QtPy
from ._version import __version__
__version__ = '2.0.0.dev0'


class PythonQtError(RuntimeError):
Expand Down
2 changes: 0 additions & 2 deletions qtpy/_version.py

This file was deleted.

47 changes: 47 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[metadata]
name = QtPy
version = attr: qtpy.__version__
description = Provides an abstraction layer on top of the various Qt bindings (PyQt5/6 and PySide2/6) and additional custom QWidgets.
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/spyder-ide/qtpy
author = Colin Duquesnoy and the Spyder Development Team
author_email = spyder.python@gmail.com
maintainer = Spyder Development Team and QtPy Contributors
maintainer_email = spyder.python@gmail.com
license = MIT
license_file = LICENSE.txt
license_files =
AUTHORS.txt
LICENSE.txt
classifiers =
Development Status :: 5 - Production/Stable
Environment :: Win32 (MS Windows)
Environment :: X11 Applications :: Qt
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
keywords = qt PyQt5 PyQt6 PySide2 PySide6
project_urls =
Github = https://github.com/r-spacex/submanager
Bug Tracker = https://github.com/r-spacex/submanager/issues
Demo = https://www.reddit.com/r/SpaceX

[options]
packages = find:
install_requires =
packaging
python_requires = >=3.6
include_pacakge_data = True
zip_safe = False

[options.packages.find]
exclude =
contrib
docs
tests*
53 changes: 5 additions & 48 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,51 +1,8 @@
#!/usr/bin/env python
#!/usr/bin/env python3

"""
Setup script for qtpy
"""
"""Stub setup.py for use with legacy build tooling."""

import os
import setuptools

from setuptools import setup, find_packages

HERE = os.path.abspath(os.path.dirname(__file__))

version_ns = {}
with open(os.path.join(HERE, 'qtpy', '_version.py')) as f:
exec(f.read(), {}, version_ns)

with open(os.path.join(HERE, 'README.md'), encoding='utf-8') as f:
LONG_DESCRIPTION = f.read()

setup(
name='QtPy',
version=version_ns['__version__'],
packages=find_packages(exclude=['contrib', 'docs', 'tests*']),
python_requires='>=3.6',
install_requires=['packaging'],
keywords=["qt PyQt5 PyQt6 PySide2 PySide6"],
url='https://github.com/spyder-ide/qtpy',
license='MIT',
author='Colin Duquesnoy and the Spyder Development Team',
author_email='spyder.python@gmail.com',
maintainer='Spyder Development Team and QtPy Contributors',
maintainer_email='spyder.python@gmail.com',
description='Provides an abstraction layer on top of the various Qt '
'bindings (PyQt5/6 and PySide2/6) and additional custom '
'QWidgets.',
long_description=LONG_DESCRIPTION,
long_description_content_type='text/markdown',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: X11 Applications :: Qt',
'Environment :: Win32 (MS Windows)',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
]
)
if __name__ == "__main__":
setuptools.setup()

0 comments on commit 3f7bf6b

Please sign in to comment.