Skip to content
Snippets Groups Projects
Commit e150f719 authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Lint setup.py

parent 18eb23bc
No related branches found
No related tags found
No related merge requests found
Pipeline #17044 passed
import distutils
import io
import os import os
import sys import sys
import io
from setuptools import setup, find_packages
import distutils
from distutils.extension import Extension
from contextlib import redirect_stdout from contextlib import redirect_stdout
from distutils.extension import Extension
from importlib import import_module from importlib import import_module
from setuptools import find_packages, setup
if '--use-cython' in sys.argv: if '--use-cython' in sys.argv:
USE_CYTHON = True USE_CYTHON = True
sys.argv.remove('--use-cython') sys.argv.remove('--use-cython')
...@@ -52,6 +53,7 @@ class SimpleTestRunner(distutils.cmd.Command): ...@@ -52,6 +53,7 @@ class SimpleTestRunner(distutils.cmd.Command):
for test in quick_tests: for test in quick_tests:
self._run_tests_in_module(test) self._run_tests_in_module(test)
def readme(): def readme():
with open('README.md') as f: with open('README.md') as f:
return f.read() return f.read()
...@@ -69,7 +71,7 @@ def cython_extensions(*extensions): ...@@ -69,7 +71,7 @@ def cython_extensions(*extensions):
try: try:
sys.path.insert(0, os.path.abspath('doc')) sys.path.insert(0, os.path.abspath('doc'))
from version_from_git import version_number_from_git from version_from_git import version_number_from_git
version=version_number_from_git() version = version_number_from_git()
with open("RELEASE-VERSION", "w") as f: with open("RELEASE-VERSION", "w") as f:
f.write(version) f.write(version)
except ImportError: except ImportError:
...@@ -88,7 +90,7 @@ setup(name='pystencils', ...@@ -88,7 +90,7 @@ setup(name='pystencils',
packages=['pystencils'] + ['pystencils.' + s for s in find_packages('pystencils')], packages=['pystencils'] + ['pystencils.' + s for s in find_packages('pystencils')],
install_requires=['sympy>=1.1', 'numpy', 'appdirs', 'joblib'], install_requires=['sympy>=1.1', 'numpy', 'appdirs', 'joblib'],
package_data={'pystencils': ['include/*.h', 'backends/cuda_known_functions.txt']}, package_data={'pystencils': ['include/*.h', 'backends/cuda_known_functions.txt']},
ext_modules = cython_extensions("pystencils.boundaries.createindexlistcython"), ext_modules=cython_extensions("pystencils.boundaries.createindexlistcython"),
classifiers=[ classifiers=[
'Development Status :: 4 - Beta', 'Development Status :: 4 - Beta',
'Framework :: Jupyter', 'Framework :: Jupyter',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment