Skip to content

Commit

Permalink
same for primero api
Browse files Browse the repository at this point in the history
  • Loading branch information
merlos committed Nov 5, 2024
1 parent fbde531 commit 955e6f1
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion primero-api/setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
from setuptools import setup, find_packages

import os
import re

def get_version():
return (open('primero_api/VERSION').read().strip())
version_file = os.path.join(os.path.dirname(__file__), 'primero_api','version.py')
with open(version_file) as f:
version_line = f.read().strip()
version_match = re.match(r"^__version__ = '\"['\"]", version_line)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")


setup(
name='primero-api',
Expand Down

0 comments on commit 955e6f1

Please sign in to comment.