diff --git a/README.rst b/README.rst index 8527649..54a7c00 100644 --- a/README.rst +++ b/README.rst @@ -1,8 +1,8 @@ ======= janus ======= -.. image:: https://travis-ci.com/aio-libs/janus.svg?branch=master - :target: https://travis-ci.com/aio-libs/janus +.. image:: https://github.com/aio-libs/janus/actions/workflows/ci.yml/badge.svg + :target: https://github.com/aio-libs/janus/actions/workflows/ci.yml .. image:: https://codecov.io/gh/aio-libs/janus/branch/master/graph/badge.svg :target: https://codecov.io/gh/aio-libs/janus .. image:: https://img.shields.io/pypi/v/janus.svg diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..617caea --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools>=51", "wheel>=0.36"] +build-backend = "setuptools.build_meta" diff --git a/setup.cfg b/setup.cfg index 3de04f7..829f520 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,54 @@ +[metadata] +name = janus +version = attr: janus.__version__ +url = https://github.com/aio-libs/janus +project_urls = + Chat: Gitter = https://gitter.im/aio-libs/Lobby + CI: GitHub Actions = https://github.com/aio-libs/janus/actions/workflows/ci.yml + Coverage: codecov = https://codecov.io/github/aio-libs/janus + GitHub: issues = https://github.com/aio-libs/janus/issues + GitHub: repo = https://github.com/aio-libs/janus +description = Mixed sync-async queue to interoperate between asyncio tasks and classic threads +long_description = file: README.rst +long_description_content_type = text/x-rst +author = Andrew Svetlov +author_email = andrew.svetlov@gmail.com +license = Apache 2 +license_files = LICENSE.txt +classifiers = + Development Status :: 5 - Production/Stable + + Framework :: AsyncIO + + Intended Audience :: Developers + + License :: OSI Approved :: Apache Software License + + Operating System :: POSIX + Operating System :: MacOS :: MacOS X + Operating System :: Microsoft :: Windows + + Programming Language :: Python + Programming Language :: Python :: 3 + 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 + + Topic :: Software Development :: Libraries + +keywords= janus, queue, asyncio + +[options] +python_requires = >=3.6 +packages = find: +# https://setuptools.readthedocs.io/en/latest/setuptools.html#setting-the-zip-safe-flag +zip_safe = True +include_package_data = True + +install_requires = + [flake8] exclude = .git,.env,__pycache__,.eggs max-line-length = 88 diff --git a/setup.py b/setup.py index dd7dedd..8bf1ba9 100644 --- a/setup.py +++ b/setup.py @@ -1,88 +1,2 @@ -import codecs -import os -import re -import sys - -from setuptools import find_packages, setup -from setuptools.command.test import test as TestCommand - - -class PyTest(TestCommand): - user_options = [("pytest-args=", "a", "Arguments to pass to py.test")] - - def initialize_options(self): - TestCommand.initialize_options(self) - self.pytest_args = [] - - def finalize_options(self): - TestCommand.finalize_options(self) - self.test_args = [] - self.test_suite = True - - def run_tests(self): - # import here, cause outside the eggs aren't loaded - import pytest - - errno = pytest.main(self.pytest_args) - sys.exit(errno) - - -with codecs.open( - os.path.join(os.path.abspath(os.path.dirname(__file__)), "janus", "__init__.py"), - "r", - "latin1", -) as fp: - try: - version = re.findall(r'^__version__ = "([^"]+)"$', fp.read(), re.M)[0] - except IndexError: - raise RuntimeError("Unable to determine version.") - - -def read(f): - return open(os.path.join(os.path.dirname(__file__), f)).read().strip() - - -install_requires = [] - -tests_require = install_requires + [ - "pytest>=5.4", - "pytest-asyncio>=0.10.0", -] -extras_require = {} - - -setup( - name="janus", - version=version, - description=( - "Mixed sync-async queue to interoperate between " - "asyncio tasks and classic threads" - ), - long_description="\n\n".join((read("README.rst"), read("CHANGES.rst"))), - classifiers=[ - "License :: OSI Approved :: Apache Software License", - "Intended Audience :: Developers", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "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", - "Topic :: Software Development :: Libraries", - "Framework :: AsyncIO", - ], - author="Andrew Svetlov", - author_email="andrew.svetlov@gmail.com", - url="https://github.com/aio-libs/janus/", - license="Apache 2", - packages=find_packages(), - python_requires=">=3.6", - install_requires=install_requires, - tests_require=tests_require, - cmdclass={"test": PyTest}, - include_package_data=True, - zip_safe=True, - keywords=["janus", "queue", "asyncio"], - extras_require=extras_require, -) +from setuptools import setup +setup()