Skip to content
Snippets Groups Projects
Commit 0b1fa69d authored by Antoine Berchet's avatar Antoine Berchet
Browse files

Merge branch 'devel' into 'LSCE'

Update setup.py

See merge request satinv/cif!102
parents dc476502 728f1427
No related branches found
No related tags found
1 merge request!20Lsce
Pipeline #72 failed
......@@ -20,25 +20,6 @@ def GDAL_with_version():
raise
def init_hooks():
# Initializing hooks
def init_hook(hook):
if (
not os.path.isfile(".git/hooks/{}".format(hook)) and
not os.path.islink(".git/hooks/{}".format(hook))
):
os.symlink(
"hooks/{}".format(hook),
".git/hooks/{}".format(hook)
)
os.chmod(".git/hooks/{}".format(hook), stat.S_IRWXU)
if os.path.isdir(".git"):
init_hook("post-checkout")
init_hook("post-merge")
def command_call(cmd, *args, **kwargs):
print("Calling the following command: '{}'".format(" ".join(cmd)))
process = subprocess.Popen(cmd, *args, **kwargs)
......@@ -47,15 +28,6 @@ def command_call(cmd, *args, **kwargs):
raise RuntimeError(
"The return code of the process is {}".format(process.returncode))
def compile_fortran():
# Compiling a first time FLEXPART sources
command_call(
["f2py", "-c", "mod_flexpart.f90", "-m", "mod_flexpart"],
cwd="pycif/plugins/models/flexpart/utils"
)
if sys.version_info[0] < 3:
NOT_FOUND_EXCEPTION = OSError
NUMPY = "numpy<1.17"
......@@ -87,14 +59,6 @@ requirements = [
]
class CustomBuild(_build):
def run(self, *args, **kwargs):
init_hooks()
compile_fortran()
_build.run(self, *args, **kwargs)
setup(
name='pyCIF',
version='0.0.2',
......@@ -104,7 +68,7 @@ setup(
author='Antoine Berchet',
author_email='antoine.berchet@lsce.ipsl.fr',
url='http://community-inversion.eu/',
license='CeCILL-B',
license='CeCILL-C',
packages=find_packages(),
install_requires=[requirements],
extras_require={
......@@ -126,16 +90,6 @@ setup(
]
},
python_requires='>=3.6',
cmdclass={
'build': CustomBuild,
},
package_data={
'pycif': [
'plugins/models/flexpart/utils/*.so',
'plugins/models/flexpart/utils/*.f90',
]
},
include_package_data=True,
entry_points={"console_scripts": ['pycif=pycif.__main__:main']},
zip_safe=False,
**setup_kwargs
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment