Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to pep517 #16

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[project]
name = "RandomWords"
version = "0.4.0"
description = "A useful module for a random text, e-mails and lorem ipsum."
readme = "README.rst"
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Natural Language :: English",
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Software Development :: Libraries :: Python Modules"
]
dependencies = []
license = {file = "LICENSE.txt"}

[[project.authors]]
name = "Tomek Święcicki"
email = "[email protected]"

[project.urls]
homepage = "https://github.com/tomislater/RandomWords"

[tool.setuptools]
packages = [ "random_words" ]
37 changes: 10 additions & 27 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
import sys

from setuptools import setup
from setuptools.command.test import test as TestCommand
try:
from setuptools.command.test import test as TestCommand
except ImportError:
# setuptools.command.test has been removed.
# The `setup` call is only necessary when defining this `cmdclass`, since
# building the project is no longer dependend on that.
# Therefore, there's no more to do here.
sys.exit()


class PyTest(TestCommand):
Expand All @@ -18,34 +25,10 @@ def run_tests(self):
sys.exit(errcode)


# Use `PyTest` as a `cmdclass`.
setup(
name='RandomWords',
version='0.4.0',
author='Tomek Święcicki',
author_email='[email protected]',
packages=['random_words'],
url='https://github.com/tomislater/RandomWords',
license='LICENSE.txt',
description='A useful module for a random text, e-mails and lorem ipsum.',
long_description=open('README.rst').read(),
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Natural Language :: English',
'Development Status :: 5 - Production/Stable',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Topic :: Software Development :: Libraries :: Python Modules',
],
include_package_data=True,
install_requires=[],
tests_require=['pytest'],
cmdclass={'test': PyTest},
test_suite='random_words.test.test_random_words',
extras_require={
'testing': ['pytest'],
},
extras_require={ 'testing': ['pytest'] }
)