Skip to content

Commit

Permalink
Updated setup.py to import version from src.straeto, added explicit s…
Browse files Browse the repository at this point in the history
…upport for Python 3.10, 3.11
  • Loading branch information
sveinbjornt committed Dec 12, 2022
1 parent fd41cec commit 3f56188
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ celerybeat-schedule
# Environments
.env
.venv
venv
env/
venv/
ENV/
Expand Down
File renamed without changes.
17 changes: 5 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,20 @@
"""

from __future__ import print_function
from __future__ import unicode_literals

import io
import sys

from glob import glob
from os.path import basename, dirname, join, splitext

from setuptools import find_packages
from setuptools import setup


if sys.version_info < (3, 6):
print("Straeto requires Python >= 3.6")
sys.exit(1)
from src.straeto import __version__


def read(*names, **kwargs):
try:
return io.open(
join(dirname(__file__), *names),
encoding=kwargs.get("encoding", "utf8")
join(dirname(__file__), *names), encoding=kwargs.get("encoding", "utf8")
).read()
except (IOError, OSError):
return ""
Expand All @@ -57,7 +48,7 @@ def read(*names, **kwargs):
setup(
name="straeto",
# Remember to modify version number in src/straeto/__init__.py as well
version="1.3.0",
version=__version__,
license="GNU GPLv3",
description="A package for information about buses and bus routes",
long_description="{0}\n".format(read("README.md")),
Expand Down Expand Up @@ -86,6 +77,8 @@ def read(*names, **kwargs):
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries :: Python Modules",
Expand Down

0 comments on commit 3f56188

Please sign in to comment.