Skip to content
Snippets Groups Projects
Verified Commit eb064ecf authored by Daniel Hornung's avatar Daniel Hornung
Browse files

WIP: Rename caosdb -> linkahead

parent 86311b39
No related branches found
No related tags found
1 merge request!111MAINT: LinkAhead rename
Pipeline #36363 failed
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# -*- encoding: utf-8 -*- # -*- encoding: utf-8 -*-
# #
# #
"""caosdb""" """linkahead"""
import os import os
import subprocess import subprocess
import sys import sys
...@@ -53,7 +53,7 @@ MICRO = 3 ...@@ -53,7 +53,7 @@ MICRO = 3
# https://github.com/pypa/packaging/pull/515 # https://github.com/pypa/packaging/pull/515
# has made it into a release. Probably we should wait for pypa/packaging>=21.4 # has made it into a release. Probably we should wait for pypa/packaging>=21.4
# https://github.com/pypa/packaging/releases # https://github.com/pypa/packaging/releases
PRE = "" # "dev" # e.g. rc0, alpha.1, 0.beta-23 PRE = "" # "dev" # e.g. rc0, alpha.1, 0.beta-23
if PRE: if PRE:
VERSION = "{}.{}.{}-{}".format(MAJOR, MINOR, MICRO, PRE) VERSION = "{}.{}.{}-{}".format(MAJOR, MINOR, MICRO, PRE)
...@@ -91,22 +91,22 @@ def git_version(): ...@@ -91,22 +91,22 @@ def git_version():
def get_version_info(): def get_version_info():
# Adding the git rev number needs to be done inside write_version_py(), # Adding the git rev number needs to be done inside write_version_py(),
# otherwise the import of caosdb.version messes up the build under # otherwise the import of linkahead.version messes up the build under
# Python 3. # Python 3.
FULLVERSION = VERSION FULLVERSION = VERSION
if os.path.exists('.git'): if os.path.exists('.git'):
GIT_REVISION = git_version() GIT_REVISION = git_version()
elif os.path.exists('caosdb_pylib_commit'): elif os.path.exists('linkahead_pylib_commit'):
with open('caosdb_pylib_commit', 'r') as f: with open('linkahead_pylib_commit', 'r') as f:
GIT_REVISION = f.read().strip() GIT_REVISION = f.read().strip()
elif os.path.exists('src/caosdb/version.py'): elif os.path.exists('src/linkahead/version.py'):
# must be a source distribution, use existing version file # must be a source distribution, use existing version file
try: try:
from caosdb.version import git_revision as GIT_REVISION from linkahead.version import git_revision as GIT_REVISION
except ImportError: except ImportError:
raise ImportError("Unable to import git_revision. Try removing " raise ImportError("Unable to import git_revision. Try removing "
"src/caosdb/version.py and the build directory " "src/linkahead/version.py and the build directory "
"before building.") "before building.")
else: else:
GIT_REVISION = "Unknown" GIT_REVISION = "Unknown"
...@@ -117,9 +117,9 @@ def get_version_info(): ...@@ -117,9 +117,9 @@ def get_version_info():
return FULLVERSION, GIT_REVISION return FULLVERSION, GIT_REVISION
def write_version_py(filename='src/caosdb/version.py'): def write_version_py(filename='src/linkahead/version.py'):
cnt = """ cnt = """
# THIS FILE IS GENERATED FROM caosdb SETUP.PY # THIS FILE IS GENERATED FROM linkahead SETUP.PY
# #
short_version = '%(version)s' short_version = '%(version)s'
version = '%(version)s' version = '%(version)s'
...@@ -154,14 +154,14 @@ def setup_package(): ...@@ -154,14 +154,14 @@ def setup_package():
write_version_py() write_version_py()
metadata = dict( metadata = dict(
name='caosdb', name='linkahead',
version=get_version_info()[0], version=get_version_info()[0],
description='Python Interface for CaosDB', description='Python Interface for LinkAhead',
long_description=long_description, long_description=long_description,
long_description_content_type="text/markdown", long_description_content_type="text/markdown",
author='Timm Fitschen', author='Timm Fitschen',
author_email='t.fitschen@indiscale.com', author_email='t.fitschen@indiscale.com',
url='https://www.caosdb.org', url='https://www.linkahead.org',
license="AGPLv3+", license="AGPLv3+",
classifiers=[ classifiers=[
"Programming Language :: Python :: 3", "Programming Language :: Python :: 3",
...@@ -178,16 +178,16 @@ def setup_package(): ...@@ -178,16 +178,16 @@ def setup_package():
"python-dateutil>=2.8.2", "python-dateutil>=2.8.2",
'PyYAML>=5.4.1', 'PyYAML>=5.4.1',
'future', 'future',
], ],
extras_require={'keyring': ['keyring>=13.0.0'], extras_require={'keyring': ['keyring>=13.0.0'],
'jsonschema': ['jsonschema>=4.4.0']}, 'jsonschema': ['jsonschema>=4.4.0']},
setup_requires=["pytest-runner>=2.0,<3dev"], setup_requires=["pytest-runner>=2.0,<3dev"],
tests_require=["pytest", "pytest-cov", "coverage>=4.4.2", tests_require=["pytest", "pytest-cov", "coverage>=4.4.2",
"jsonschema>=4.4.0"], "jsonschema>=4.4.0"],
package_data={ package_data={
'caosdb': ['cert/indiscale.ca.crt', 'schema-pycaosdb-ini.yml'], 'linkahead': ['cert/indiscale.ca.crt', 'schema-pylinkahead-ini.yml'],
}, },
scripts=["src/caosdb/utils/caosdb_admin.py"] scripts=["src/linkahead/utils/linkahead_admin.py"]
) )
try: try:
setup(**metadata) setup(**metadata)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment