diff --git a/humanized_opening_hours/__init__.py b/humanized_opening_hours/__init__.py index 6815209..91ebb3a 100644 --- a/humanized_opening_hours/__init__.py +++ b/humanized_opening_hours/__init__.py @@ -13,11 +13,6 @@ """ # flake8: noqa -__version__ = "1.0.0b3" -__appname__ = "osm_humanized_opening_hours" -__author__ = "rezemika " -__licence__ = "AGPLv3" - import os as _os import gettext as _gettext _gettext.install("HOH", @@ -26,6 +21,7 @@ ) ) +from humanized_opening_hours.version import __version__, __appname__, __author__, __licence__ from humanized_opening_hours.main import OHParser, sanitize, days_of_week from humanized_opening_hours.temporal_objects import easter_date from humanized_opening_hours.rendering import AVAILABLE_LOCALES diff --git a/humanized_opening_hours/field.ebnf b/humanized_opening_hours/field.ebnf index 852b2b1..56bff5a 100644 --- a/humanized_opening_hours/field.ebnf +++ b/humanized_opening_hours/field.ebnf @@ -6,11 +6,11 @@ EVENT : "dawn" | "sunrise" | "sunset" | "dusk" EASTER : "easter" OPEN : " open" CLOSED : " closed" | " off" -ALWAYS_OPEN.2 : "24/7" -WEEK.2 : "week " +ALWAYS_OPEN : "24/7" +WEEK : "week " TWO_DIGITS.1 : /[0-9][0-9]+/ -YEAR.3 : /([12][0-9]{3})+/ +YEAR : /([12][0-9]{3})+/ PLUS_OR_MINUS : "+" | "-" diff --git a/humanized_opening_hours/version.py b/humanized_opening_hours/version.py new file mode 100644 index 0000000..52295be --- /dev/null +++ b/humanized_opening_hours/version.py @@ -0,0 +1,4 @@ +__version__ = "1.0.0b3" +__appname__ = "osm_humanized_opening_hours" +__author__ = "rezemika " +__licence__ = "AGPLv3" diff --git a/requirements-dev.txt b/requirements-dev.txt index 3d70faf..b42ebc5 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,8 +1,8 @@ astral==1.7.1 -Babel==2.6.0 +Babel==2.9.0 +pytz==2020.5 +lark-parser==0.11.1 flake8==3.6.0 -lark-parser==0.6.5 pyflakes==2.0.0 -pytz==2018.7 twine==1.12.1 requests==2.20.1 diff --git a/requirements.txt b/requirements.txt index 391a4cd..957828f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ astral==1.7.1 -Babel==2.6.0 -pytz==2018.7 -lark-parser==0.6.5 +Babel==2.9.0 +pytz==2020.5 +lark-parser==0.11.1 diff --git a/setup.py b/setup.py index 563c04d..2ac311e 100644 --- a/setup.py +++ b/setup.py @@ -1,13 +1,13 @@ from setuptools import setup, find_packages import os -import humanized_opening_hours - BASE_DIR = os.path.dirname(os.path.realpath(__file__)) +exec(open(os.path.join( + BASE_DIR, 'humanized_opening_hours', 'version.py')).read()) setup( name="osm_humanized_opening_hours", - version=humanized_opening_hours.__version__, + version=__version__, # noqa packages=find_packages(exclude=["doc", "tests"]), author="rezemika", author_email="reze.mika@gmail.com",