Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3.2.1 - Bugfix/fix packaging error in pipline #894

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lyrebird/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
IVERSION = (3, 2, 0)
IVERSION = (3, 2, 1)
VERSION = ".".join(str(i) for i in IVERSION)
LYREBIRD = "Lyrebird " + VERSION
12 changes: 7 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import runpy
import os
import sys
from packaging import version
from setuptools import setup, find_packages
from setuptools import setup

here = os.path.abspath(os.path.dirname(__file__))

Expand All @@ -11,6 +10,7 @@
)["VERSION"]


# Formatting (Spaces, etc.) in requirement must be consistent based on string parsing
def read_requirements(file_path):
with open(file_path, encoding='utf-8') as f:
return [
Expand All @@ -22,19 +22,20 @@ def read_requirements(file_path):
)
]


def check_version_condition(condition):
if not condition.startswith('python_version'):
return True
op, ver = condition.split(' ', 1)[1].split(' ')
current_ver = version.parse('.'.join(map(str, sys.version_info[:2])))
ver = version.parse(ver.strip('"'))
current_ver = sys.version_info[:2]
ver = tuple(map(int, ver.strip('"').split('.')))
return {
'>': current_ver > ver,
'>=': current_ver >= ver,
'<': current_ver < ver,
'<=': current_ver <= ver,
'==': current_ver == ver
}.get(op, False)
}.get(op)


with open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
Expand Down Expand Up @@ -68,6 +69,7 @@ def check_version_condition(condition):
'lyrebird = lyrebird.manager:main'
]
},
setup_requires=['packaging'],
install_requires=read_requirements('requirements.txt.lock'),
extras_require={
'dev': read_requirements('requirements.dev.txt')
Expand Down
Loading