Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

Commit

Permalink
setup.py repetition fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
rjdbcm committed Nov 19, 2021
1 parent 60ad127 commit 0b47657
Showing 1 changed file with 88 additions and 171 deletions.
259 changes: 88 additions & 171 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,185 +11,100 @@
from setuptools.dist import Distribution
from setuptools.command.install import install
from setuptools.command.build_ext import build_ext

module_paths = [str(Path('Aspidites/_vendor/contracts/metaclass.py')),
str(Path('Aspidites/_vendor/contracts/interface.py')),
str(Path('Aspidites/_vendor/contracts/syntax.py')),
str(Path('Aspidites/_vendor/contracts/inspection.py')),
str(Path('Aspidites/_vendor/contracts/docstring_parsing.py')),
str(Path('Aspidites/_vendor/contracts/main_actual.py')),
str(Path('Aspidites/_vendor/contracts/library/arithmetic.py')),
str(Path('Aspidites/_vendor/contracts/library/files.py')),
str(Path('Aspidites/_vendor/contracts/library/array_ops.py')),
str(Path('Aspidites/_vendor/contracts/library/tuple.py')),
str(Path('Aspidites/_vendor/contracts/library/types_misc.py')),
str(Path('Aspidites/_vendor/contracts/library/lists.py')),
str(Path('Aspidites/_vendor/contracts/library/miscellaneous_aliases.py')),
str(Path('Aspidites/_vendor/contracts/library/attributes.py')),
str(Path('Aspidites/_vendor/contracts/library/suggester.py')),
str(Path('Aspidites/_vendor/contracts/library/variables.py')),
str(Path('Aspidites/_vendor/contracts/library/separate_context.py')),
str(Path('Aspidites/_vendor/contracts/library/simple_values.py')),
str(Path('Aspidites/_vendor/contracts/library/map.py')),
str(Path('Aspidites/_vendor/contracts/library/comparison.py')),
str(Path('Aspidites/_vendor/contracts/library/extensions.py')),
str(Path('Aspidites/_vendor/contracts/library/collection.py')),
str(Path('Aspidites/_vendor/contracts/library/datetime_tz.py')),
str(Path('Aspidites/_vendor/contracts/library/scoped_variables.py')),
str(Path('Aspidites/_vendor/contracts/library/array.py')),
str(Path('Aspidites/_vendor/contracts/library/sets.py')),
str(Path('Aspidites/_vendor/contracts/library/dummy.py')),
str(Path('Aspidites/_vendor/contracts/library/dicts.py')),
str(Path('Aspidites/_vendor/contracts/library/compositions.py')),
str(Path('Aspidites/_vendor/contracts/library/strings.py')),
str(Path('Aspidites/_vendor/contracts/library/isinstance_imp.py')),
str(Path('Aspidites/_vendor/contracts/library/seq.py')),
str(Path('Aspidites/_vendor/contracts/useful_contracts/numbers.py')),
str(Path("Aspidites/_vendor/fn/func.py")),
str(Path("Aspidites/_vendor/fn/iters.py")),
str(Path("Aspidites/_vendor/fn/op.py")),
str(Path("Aspidites/_vendor/fn/recur.py")),
str(Path("Aspidites/_vendor/fn/stream.py")),
str(Path("Aspidites/_vendor/fn/underscore.py")),
str(Path("Aspidites/_vendor/fn/uniform.py")),
str(Path('Aspidites/_vendor/decorator_extension.py')),
str(Path('Aspidites/_vendor/pyparsing_extension.py')),
str(Path('Aspidites/parser/convert.py')),
str(Path('Aspidites/parser/reserved.py')),
str(Path('Aspidites/parser/parser.py')),
str(Path('Aspidites/templates.py')),
str(Path('Aspidites/monads.py')),
str(Path('Aspidites/math.py')),
str(Path('Aspidites/api.py')),
str(Path('Aspidites/__main__.py')),
str(Path('Aspidites/compiler.py')),
str(Path('Aspidites/woma/fileutils.py')),
str(Path('Aspidites/woma/gcutils.py')),
str(Path('Aspidites/woma/mathutils.py')),
str(Path('Aspidites/_vendor/pyrsistent/typing.py')),
# str(Path('Aspidites/_vendor/pyrsistent/_transformations.py')),
str(Path('Aspidites/_vendor/pyrsistent/_checked_types.py')),
# str(Path('Aspidites/_vendor/pyrsistent/_field_common.py')),
str(Path('Aspidites/_vendor/pyrsistent/_helpers.py')),
str(Path('Aspidites/_vendor/pyrsistent/_immutable.py')),
str(Path('Aspidites/_vendor/pyrsistent/_pclass.py')),
str(Path('Aspidites/_vendor/pyrsistent/_pbag.py')),
str(Path('Aspidites/_vendor/pyrsistent/_pdeque.py')),
str(Path('Aspidites/_vendor/pyrsistent/_plist.py')),
str(Path('Aspidites/_vendor/pyrsistent/_pmap.py')),
str(Path('Aspidites/_vendor/pyrsistent/_precord.py')),
str(Path('Aspidites/_vendor/pyrsistent/_pset.py')),
str(Path('Aspidites/_vendor/pyrsistent/_pvector.py')),
str(Path('Aspidites/_vendor/pyrsistent/_toolz.py')),
str(Path('Aspidites/_vendor/apm/error.py')),
# str(Path('Aspidites/_vendor/apm/case_of.py')),
str(Path('Aspidites/_vendor/apm/patterns.py')),
str(Path('Aspidites/_vendor/apm/overload.py')),
str(Path('Aspidites/_vendor/apm/try_match.py')),
# str(Path('Aspidites/_vendor/apm/typefoo.py')),
# str(Path('Aspidites/_vendor/apm/core.py')),
str(Path('Aspidites/_vendor/apm/_util.py')),
# str(Path('Aspidites/_vendor/apm/agg.py')),
str(Path('Aspidites/_vendor/apm/generic.py')),
str(Path('Aspidites/_vendor/apm/no_value.py')),
str(Path('Aspidites/_vendor/apm/match.py')),
]

try:
from numpy import get_include
module_paths = [str(Path('Aspidites/_vendor/contracts/useful_contracts/numpy_specific.py')),]
module_paths += [str(Path('Aspidites/_vendor/contracts/useful_contracts/numpy_specific.py'))]
except ModuleNotFoundError:
def get_include():
try:
return sysconfig.get_config_vars()['CONFINCLUDEPY']
except KeyError:
return ''

module_paths = [str(Path('Aspidites/_vendor/contracts/metaclass.py')),
str(Path('Aspidites/_vendor/contracts/interface.py')),
str(Path('Aspidites/_vendor/contracts/syntax.py')),
str(Path('Aspidites/_vendor/contracts/inspection.py')),
str(Path('Aspidites/_vendor/contracts/docstring_parsing.py')),
str(Path('Aspidites/_vendor/contracts/main_actual.py')),
str(Path('Aspidites/_vendor/contracts/library/arithmetic.py')),
str(Path('Aspidites/_vendor/contracts/library/files.py')),
str(Path('Aspidites/_vendor/contracts/library/array_ops.py')),
str(Path('Aspidites/_vendor/contracts/library/tuple.py')),
str(Path('Aspidites/_vendor/contracts/library/types_misc.py')),
str(Path('Aspidites/_vendor/contracts/library/lists.py')),
str(Path('Aspidites/_vendor/contracts/library/miscellaneous_aliases.py')),
str(Path('Aspidites/_vendor/contracts/library/attributes.py')),
str(Path('Aspidites/_vendor/contracts/library/suggester.py')),
str(Path('Aspidites/_vendor/contracts/library/variables.py')),
str(Path('Aspidites/_vendor/contracts/library/separate_context.py')),
str(Path('Aspidites/_vendor/contracts/library/simple_values.py')),
str(Path('Aspidites/_vendor/contracts/library/map.py')),
str(Path('Aspidites/_vendor/contracts/library/comparison.py')),
str(Path('Aspidites/_vendor/contracts/library/extensions.py')),
str(Path('Aspidites/_vendor/contracts/library/collection.py')),
str(Path('Aspidites/_vendor/contracts/library/datetime_tz.py')),
str(Path('Aspidites/_vendor/contracts/library/scoped_variables.py')),
str(Path('Aspidites/_vendor/contracts/library/array.py')),
str(Path('Aspidites/_vendor/contracts/library/sets.py')),
str(Path('Aspidites/_vendor/contracts/library/dummy.py')),
str(Path('Aspidites/_vendor/contracts/library/dicts.py')),
str(Path('Aspidites/_vendor/contracts/library/compositions.py')),
str(Path('Aspidites/_vendor/contracts/library/strings.py')),
str(Path('Aspidites/_vendor/contracts/library/isinstance_imp.py')),
str(Path('Aspidites/_vendor/contracts/library/seq.py')),
str(Path('Aspidites/_vendor/contracts/useful_contracts/numbers.py')),
str(Path("Aspidites/_vendor/fn/func.py")),
str(Path("Aspidites/_vendor/fn/iters.py")),
str(Path("Aspidites/_vendor/fn/op.py")),
str(Path("Aspidites/_vendor/fn/recur.py")),
str(Path("Aspidites/_vendor/fn/stream.py")),
str(Path("Aspidites/_vendor/fn/underscore.py")),
str(Path("Aspidites/_vendor/fn/uniform.py")),
str(Path('Aspidites/_vendor/decorator_extension.py')),
str(Path('Aspidites/_vendor/pyparsing_extension.py')),
str(Path('Aspidites/parser/convert.py')),
str(Path('Aspidites/parser/reserved.py')),
str(Path('Aspidites/parser/parser.py')),
str(Path('Aspidites/templates.py')),
str(Path('Aspidites/monads.py')),
str(Path('Aspidites/math.py')),
str(Path('Aspidites/api.py')),
str(Path('Aspidites/__main__.py')),
str(Path('Aspidites/compiler.py')),
str(Path('Aspidites/woma/fileutils.py')),
str(Path('Aspidites/woma/gcutils.py')),
str(Path('Aspidites/woma/guiutils.py')),
str(Path('Aspidites/woma/mathutils.py')),
str(Path('Aspidites/_vendor/pyrsistent/typing.py')),
# str(Path('Aspidites/_vendor/pyrsistent/_transformations.py')),
str(Path('Aspidites/_vendor/pyrsistent/_checked_types.py')),
# str(Path('Aspidites/_vendor/pyrsistent/_field_common.py')),
str(Path('Aspidites/_vendor/pyrsistent/_helpers.py')),
str(Path('Aspidites/_vendor/pyrsistent/_immutable.py')),
str(Path('Aspidites/_vendor/pyrsistent/_pclass.py')),
str(Path('Aspidites/_vendor/pyrsistent/_pbag.py')),
str(Path('Aspidites/_vendor/pyrsistent/_pdeque.py')),
str(Path('Aspidites/_vendor/pyrsistent/_plist.py')),
str(Path('Aspidites/_vendor/pyrsistent/_pmap.py')),
str(Path('Aspidites/_vendor/pyrsistent/_precord.py')),
str(Path('Aspidites/_vendor/pyrsistent/_pset.py')),
str(Path('Aspidites/_vendor/pyrsistent/_pvector.py')),
str(Path('Aspidites/_vendor/pyrsistent/_toolz.py')),
str(Path('Aspidites/_vendor/apm/error.py')),
# str(Path('Aspidites/_vendor/apm/case_of.py')),
str(Path('Aspidites/_vendor/apm/patterns.py')),
str(Path('Aspidites/_vendor/apm/overload.py')),
str(Path('Aspidites/_vendor/apm/try_match.py')),
# str(Path('Aspidites/_vendor/apm/typefoo.py')),
# str(Path('Aspidites/_vendor/apm/core.py')),
str(Path('Aspidites/_vendor/apm/_util.py')),
# str(Path('Aspidites/_vendor/apm/agg.py')),
str(Path('Aspidites/_vendor/apm/generic.py')),
str(Path('Aspidites/_vendor/apm/no_value.py')),
str(Path('Aspidites/_vendor/apm/match.py')),
]
else:
module_paths = [str(Path('Aspidites/_vendor/contracts/metaclass.py')),
str(Path('Aspidites/_vendor/contracts/interface.py')),
str(Path('Aspidites/_vendor/contracts/syntax.py')),
str(Path('Aspidites/_vendor/contracts/inspection.py')),
str(Path('Aspidites/_vendor/contracts/docstring_parsing.py')),
str(Path('Aspidites/_vendor/contracts/main_actual.py')),
str(Path('Aspidites/_vendor/contracts/library/arithmetic.py')),
str(Path('Aspidites/_vendor/contracts/library/files.py')),
str(Path('Aspidites/_vendor/contracts/library/array_ops.py')),
str(Path('Aspidites/_vendor/contracts/library/tuple.py')),
str(Path('Aspidites/_vendor/contracts/library/types_misc.py')),
str(Path('Aspidites/_vendor/contracts/library/lists.py')),
str(Path('Aspidites/_vendor/contracts/library/miscellaneous_aliases.py')),
str(Path('Aspidites/_vendor/contracts/library/attributes.py')),
str(Path('Aspidites/_vendor/contracts/library/suggester.py')),
str(Path('Aspidites/_vendor/contracts/library/variables.py')),
str(Path('Aspidites/_vendor/contracts/library/separate_context.py')),
str(Path('Aspidites/_vendor/contracts/library/simple_values.py')),
str(Path('Aspidites/_vendor/contracts/library/map.py')),
str(Path('Aspidites/_vendor/contracts/library/comparison.py')),
str(Path('Aspidites/_vendor/contracts/library/extensions.py')),
str(Path('Aspidites/_vendor/contracts/library/collection.py')),
str(Path('Aspidites/_vendor/contracts/library/datetime_tz.py')),
str(Path('Aspidites/_vendor/contracts/library/scoped_variables.py')),
str(Path('Aspidites/_vendor/contracts/library/array.py')),
str(Path('Aspidites/_vendor/contracts/library/sets.py')),
str(Path('Aspidites/_vendor/contracts/library/dummy.py')),
str(Path('Aspidites/_vendor/contracts/library/dicts.py')),
str(Path('Aspidites/_vendor/contracts/library/compositions.py')),
str(Path('Aspidites/_vendor/contracts/library/strings.py')),
str(Path('Aspidites/_vendor/contracts/library/isinstance_imp.py')),
str(Path('Aspidites/_vendor/contracts/library/seq.py')),
str(Path('Aspidites/_vendor/contracts/useful_contracts/numbers.py')),
str(Path('Aspidites/_vendor/contracts/useful_contracts/numpy_specific.py')),
str(Path("Aspidites/_vendor/fn/func.py")),
str(Path("Aspidites/_vendor/fn/iters.py")),
str(Path("Aspidites/_vendor/fn/op.py")),
str(Path("Aspidites/_vendor/fn/recur.py")),
str(Path("Aspidites/_vendor/fn/stream.py")),
str(Path("Aspidites/_vendor/fn/underscore.py")),
str(Path("Aspidites/_vendor/fn/uniform.py")),
str(Path('Aspidites/_vendor/decorator_extension.py')),
str(Path('Aspidites/_vendor/pyparsing_extension.py')),
str(Path('Aspidites/parser/convert.py')),
str(Path('Aspidites/parser/reserved.py')),
str(Path('Aspidites/parser/parser.py')),
str(Path('Aspidites/templates.py')),
str(Path('Aspidites/monads.py')),
str(Path('Aspidites/math.py')),
str(Path('Aspidites/api.py')),
str(Path('Aspidites/__main__.py')),
str(Path('Aspidites/compiler.py')),
str(Path('Aspidites/woma/fileutils.py')),
str(Path('Aspidites/woma/gcutils.py')),
str(Path('Aspidites/woma/guiutils.py')),
str(Path('Aspidites/woma/mathutils.py')),
str(Path('Aspidites/_vendor/pyrsistent/typing.py')),
# str(Path('Aspidites/_vendor/pyrsistent/_transformations.py')),
str(Path('Aspidites/_vendor/pyrsistent/_checked_types.py')),
# str(Path('Aspidites/_vendor/pyrsistent/_field_common.py')),
str(Path('Aspidites/_vendor/pyrsistent/_helpers.py')),
str(Path('Aspidites/_vendor/pyrsistent/_immutable.py')),
str(Path('Aspidites/_vendor/pyrsistent/_pclass.py')),
str(Path('Aspidites/_vendor/pyrsistent/_pbag.py')),
str(Path('Aspidites/_vendor/pyrsistent/_pdeque.py')),
str(Path('Aspidites/_vendor/pyrsistent/_plist.py')),
str(Path('Aspidites/_vendor/pyrsistent/_pmap.py')),
str(Path('Aspidites/_vendor/pyrsistent/_precord.py')),
str(Path('Aspidites/_vendor/pyrsistent/_pset.py')),
str(Path('Aspidites/_vendor/pyrsistent/_pvector.py')),
str(Path('Aspidites/_vendor/pyrsistent/_toolz.py')),
str(Path('Aspidites/_vendor/apm/error.py')),
# str(Path('Aspidites/_vendor/apm/case_of.py')),
str(Path('Aspidites/_vendor/apm/patterns.py')),
str(Path('Aspidites/_vendor/apm/overload.py')),
str(Path('Aspidites/_vendor/apm/try_match.py')),
# str(Path('Aspidites/_vendor/apm/typefoo.py')),
# str(Path('Aspidites/_vendor/apm/core.py')),
str(Path('Aspidites/_vendor/apm/_util.py')),
# str(Path('Aspidites/_vendor/apm/agg.py')),
str(Path('Aspidites/_vendor/apm/generic.py')),
str(Path('Aspidites/_vendor/apm/no_value.py')),
str(Path('Aspidites/_vendor/apm/match.py')),
]

# ~#~ # Build static libs # ~#~ #
from Cython.Build import cythonize
from Cython.Compiler import Options
Expand All @@ -204,10 +119,12 @@ def get_include():
for i in module_paths:
extensions.append(Extension(i.replace('.py', '').replace(sep, '.'), sources=[i], extra_compile_args=['-fno-wrapv']))

print('compiling vendored extensions\n-----------------------------')
print('compiling vendored extensions\n'
'-----------------------------')
for lib in vendored:
module = importlib.import_module('Aspidites._vendor.' + lib)
print(lib, getattr(module, '__version__'))
print('-----------------------------')

ext_modules = cythonize(extensions, quiet=True)
ext_modules += [Extension('Aspidites._vendor.pyrsistent.pvectorc', sources=['Aspidites/_vendor/pyrsistent/pvectorcmodule.c'])]
Expand Down

0 comments on commit 0b47657

Please sign in to comment.