From 0bf4d9b06ada5bcfddc0e4451d5703f330365b82 Mon Sep 17 00:00:00 2001 From: donmai-me <71143298+donmai-me@users.noreply.github.com> Date: Wed, 1 Mar 2023 14:55:52 +0800 Subject: [PATCH] python 3.7 support Added support for Python 3.7. Fixes #12 --- CHANGELOG.md | 10 +++++++++- maiconverter/__init__.py | 6 +++++- setup.py | 12 ++++++++---- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fbe4f6..17df9bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.14.6] - 2023-03-01 +### Added +- Support for Python version 3.7 [GitHub Issue](https://github.com/donmai-me/MaiConverter/issues/12) + +### Fixed +- Fixed parsing of negative `&first` Simai tags. Credit to [ReiFan49](https://github.com/ReiFan49) + ## [0.14.5] - 2022-02-10 ### Changed - Changed behaviour of `ma2_to_simai` and `simai_to_ma2` to compensate for the fact that Simai disregards BPM changes for slide delays, and slide and hold durations. @@ -77,7 +84,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Ma2 to Sdt conversion and vice versa. - Simai to Sdt conversion and vice versa. -[Unreleased]: https://github.com/donmai-me/MaiConverter/compare/0.14.5...HEAD +[Unreleased]: https://github.com/donmai-me/MaiConverter/compare/0.14.6...HEAD +[0.14.6]: https://github.com/donmai-me/MaiConverter/compare/0.14.5...0.14.6 [0.14.5]: https://github.com/donmai-me/MaiConverter/compare/0.14.4...0.14.5 [0.14.4]: https://github.com/donmai-me/MaiConverter/compare/0.14.3...0.14.4 [0.14.3]: https://github.com/donmai-me/MaiConverter/compare/0.14.2...0.14.3 diff --git a/maiconverter/__init__.py b/maiconverter/__init__.py index 3968851..5c8f018 100644 --- a/maiconverter/__init__.py +++ b/maiconverter/__init__.py @@ -1,4 +1,8 @@ -from importlib.metadata import version, PackageNotFoundError +try: + from importlib.metadata import version, PackageNotFoundError +except ImportError: + from importlib_metadata import version, PackageNotFoundError + from maiconverter.cli import main try: diff --git a/setup.py b/setup.py index b84cf3f..addbd77 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,10 @@ from setuptools import setup -with open("README.md", "r", encoding="utf-8") as fh: - long_description = fh.read() +with open("README.md") as f: + long_description = f.read() + +with open("requirements.txt") as f: + requirements = f.read() setup( name="MaiConverter", @@ -33,8 +36,9 @@ entry_points={ "console_scripts": ["maiconverter=maiconverter.cli:main"], }, - python_requires="~=3.8", + python_requires=">=3.7", use_scm_version=True, setup_requires=["setuptools_scm"], - install_requires=["pycryptodome~=3.9", "lark-parser~=0.11"], + install_requires=requirements, + extras_requires={':python_version < "3.8"': ["importlib-metadata"]}, )