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

setup.py: Move all configuration to setup.cfg #224

Merged
merged 8 commits into from
Apr 2, 2019
Merged
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ before_install:

install:
- pip install -e .;
- pip install pytest;
- pip install -r requirements-tests.txt;

script:
- pytest
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ environment:

install:
- '%PYTHON%\Scripts\pip install -e .'
- '%PYTHON%\Scripts\pip install pytest'
- '%PYTHON%\Scripts\pip install -r requirements-tests.txt'
build: off
test_script:
- '%PYTHON%\Scripts\pytest'
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
# Minimum requirements for the build system to execute.
requires = ["setuptools", "wheel"] # PEP 508 specifications.
1 change: 1 addition & 0 deletions requirements-tests.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pygame
ppb-vector
dataclasses; python_version < "3.7"
35 changes: 35 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[aliases]
test = pytest

[metadata]
name = ppb
version = 0.5.0
author = Piper Thunstrom
author_email = pathunstrom@gmail.com
description = An Event Driven Python Game Engine
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/ppb/pursuedpybear
license = Artistic-2.0
classifiers =
Development Status :: 4 - Beta
Intended Audience :: Education
Intended Audience :: Developers
License :: OSI Approved :: Artistic License
Natural Language :: English
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Topic :: Games/Entertainment
Topic :: Software Development :: Libraries
Operating System :: OS Independent

[options]
packages =
ppb
ppb.systems

setup_requires =
pytest-runner

python_requires = >= 3.6
42 changes: 13 additions & 29 deletions setup.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,36 +1,20 @@
#!/usr/bin/env python3
from setuptools import setup


def readme():
with open('README.md') as file:
return file.read()
def requirements(section=None):
"""Helper for loading dependencies from requirements files."""
if section is None:
filename = "requirements.txt"
else:
filename = f"requirements-{section}.txt"

with open(filename) as file:
return [line.strip() for line in file]


# See setup.cfg for the actual configuration.
setup(
name='ppb',
version='0.5.0',
packages=['ppb', 'ppb.systems'],
install_requires=[
'pygame',
'ppb-vector',
'dataclasses; python_version < "3.7"'
],
python_requires=">=3.6",
url='https://github.com/ppb/pursuedpybear',
license='Artistic-2.0',
author='Piper Thunstrom',
author_email='pathunstrom@gmail.com',
description='An Event Driven Python Game Engine',
long_description=readme(),
long_description_content_type="text/markdown",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Education",
"Intended Audience :: Developers",
"License :: OSI Approved :: Artistic License",
"Natural Language :: English",
"Programming Language :: Python :: 3.7",
"Topic :: Games/Entertainment",
"Topic :: Software Development :: Libraries",
]
install_requires=requirements(),
tests_require=requirements('tests'),
)