Skip to content

Commit

Permalink
Merge #176
Browse files Browse the repository at this point in the history
176: Expose the version number programatically. r=astronouth7303 a=nbraud

This addresses the [feedback] I left Piper on the 1.0 release PR, _i.e._ the version info is now exposed programmatically without duplicating it across `setup.cfg` and `__init__.py`.

[feedback]: #23 (comment)

Co-authored-by: Nicolas Braud-Santoni <nicolas@braud-santoni.eu>
  • Loading branch information
bors[bot] and nbraud committed Jun 26, 2019
2 parents 390074b + 3f67c14 commit 036dfb1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions ppb_vector/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

__all__ = ('Vector',)

#: ppb_vector's current version.
#: It follows the semantic versioning convention.
__version__ = "1.0b1"

# Anything convertable to a Vector, including lists, tuples, and dicts
VectorLike = typing.Union[
Expand Down
4 changes: 1 addition & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = ppb-vector
version = 1.0b1
version = attr: ppb_vector.__version__
author = Piper Thunstrom
author_email = pathunstrom@gmail.com
description = A basic game development Vector class.
Expand All @@ -22,8 +22,6 @@ packages = ppb_vector
python_requires = >= 3.6
zip_safe = True

setup_requires = pytest-runner

[aliases]
test = pytest

Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ def requirements(section=None):

# See setup.cfg for the actual configuration.
setup(
# setup needs to be able to import the library, for attr: to work
setup_requires=requirements() + ['pytest-runner'],
install_requires=requirements(),
tests_require=requirements('tests'),
)

0 comments on commit 036dfb1

Please sign in to comment.