22.1.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 9f257b04 authored by eckhart's avatar eckhart

setup.py setup_stringview.py: cleaned up

parent 3652b118
......@@ -10,7 +10,7 @@ except ImportError:
from DHParser.versionnumber import __version__
compile_modules = [
cythonize_modules = [
'DHParser/stringview.py',
'DHParser/toolkit.py',
'DHParser/preprocess.py',
......@@ -24,21 +24,6 @@ compile_modules = [
'DHParser/ebnf.py',
]
if len(sys.argv) > 1:
all_modules = [os.path.splitext(file_name)[0]
for file_name in os.listdir('DHParser')
if file_name.endswith('.py')]
if sys.argv[1] == '*':
compile_modules = ['DHParser/' + name + '.py' for name in all_modules]
else:
compile_modules
for arg in sys.argv[1:]:
name = os.path.splitext(arg)[0]
if name in all_modules:
compile_modules.append('DHParser/' + name + '.py')
else:
print('Module "%s" does not exist!' % name)
with open('README.md', encoding='utf-8') as f:
read_me = f.read()
......@@ -46,7 +31,7 @@ setuptools.setup(
name='DHParser',
version=__version__,
packages=['DHParser', 'DHParser.scripts'],
ext_modules=cythonize(compile_modules, nthreads=0, annotate=False),
ext_modules=cythonize(cythonize_modules, nthreads=0, annotate=False),
url='https://gitlab.lrz.de/badw-it/DHParser',
license='[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0)',
author='Eckhart Arnold',
......
......@@ -10,7 +10,7 @@ except ImportError:
from DHParser.versionnumber import __version__
compile_modules = [
cythonize_modules = [
'DHParser/stringview.py',
'DHParser/toolkit.py',
# 'DHParser/preprocess.py',
......@@ -24,21 +24,6 @@ compile_modules = [
# 'DHParser/ebnf.py',
]
if len(sys.argv) > 1:
all_modules = [os.path.splitext(file_name)[0]
for file_name in os.listdir('DHParser')
if file_name.endswith('.py')]
if sys.argv[1] == '*':
compile_modules = ['DHParser/' + name + '.py' for name in all_modules]
else:
compile_modules
for arg in sys.argv[1:]:
name = os.path.splitext(arg)[0]
if name in all_modules:
compile_modules.append('DHParser/' + name + '.py')
else:
print('Module "%s" does not exist!' % name)
with open('README.md', encoding='utf-8') as f:
read_me = f.read()
......@@ -46,7 +31,7 @@ setuptools.setup(
name='DHParser',
version=__version__,
packages=['DHParser', 'DHParser.scripts'],
ext_modules=cythonize(compile_modules, nthreads=0, annotate=False),
ext_modules=cythonize(cythonize_modules, nthreads=0, annotate=False),
url='https://gitlab.lrz.de/badw-it/DHParser',
license='[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0)',
author='Eckhart Arnold',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment