Skip to content

Commit

Permalink
fix: fix broken setup (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
ziafazal authored May 28, 2024
1 parent eda9246 commit bd1b55e
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
import io
import os
import re
from setuptools import setup
from openedxscorm.__about__ import __version__


def get_version(*file_paths):
"""
Extract the version string from the file at the given relative path fragments.
"""
filename = os.path.join(os.path.dirname(__file__), *file_paths)
with open(filename, encoding='utf-8') as opened_file:
version_file = opened_file.read()
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError('Unable to find version string.')


VERSION = get_version("openedxscorm", "__about__.py")

def package_data(pkg, roots):
"""Generic function to find package_data.
Expand All @@ -27,7 +43,7 @@ def package_data(pkg, roots):

setup(
name="openedx-scorm-xblock",
version=__version__,
version=VERSION,
description="Scorm XBlock for Open edX",
long_description=readme,
long_description_content_type="text/x-rst",
Expand Down

0 comments on commit bd1b55e

Please sign in to comment.