Skip to content

Commit

Permalink
Merge pull request #17 from lschoe/main
Browse files Browse the repository at this point in the history
Add winloop.__version__ (as in uvloop).
  • Loading branch information
Vizonex authored Mar 27, 2024
2 parents 0cf7326 + a38dedf commit 0edb02d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
13 changes: 11 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,18 @@


HERE = pathlib.Path("winloop")
_ROOT = pathlib.Path(__file__).parent

__version__ = "0.1.3"

with open(str(_ROOT / 'winloop' / '_version.py')) as f:
for line in f:
if line.startswith('__version__ ='):
_, _, version = line.partition('=')
VERSION = version.strip(" \n'\"")
break
else:
raise RuntimeError(
'unable to read the version from winloop/_version.py')


# This is a temporary test Solution and is not the official file yet but this is to display/show what
Expand Down Expand Up @@ -54,7 +63,7 @@ def do_installation():
setup(
name="winloop",
author="Vizonex",
version=__version__,
version=VERSION,
description="""An alternative library for uvloop compatibility with Windows""",
ext_modules=cythonize(ext),
license="MIT",
Expand Down
3 changes: 1 addition & 2 deletions winloop/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@

# from . import includes as __includes # NOQA
from .loop import Loop as __BaseLoop # NOQA

# from ._version import __version__ # NOQA
from ._version import __version__ # NOQA


__all__ = ("new_event_loop", "install", "EventLoopPolicy")
Expand Down
13 changes: 13 additions & 0 deletions winloop/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This file MUST NOT contain anything but the __version__ assignment.
#
# When making a release, change the value of __version__
# to an appropriate value, and open a pull request against
# the correct branch (master if making a new feature release).
# The commit message MUST contain a properly formatted release
# log, and the commit must be signed.
#
# The release automation will: build and test the packages for the
# supported platforms, publish the packages on PyPI, merge the PR
# to the target branch, create a Git tag pointing to the commit.

__version__ = '0.1.3'

0 comments on commit 0edb02d

Please sign in to comment.