Skip to content
Snippets Groups Projects
Commit ec2fa712 authored by Mikkel Friis-Møller's avatar Mikkel Friis-Møller
Browse files

change the way wisdem is installed to allow for upload to pypi

parent 142aa78c
No related branches found
No related tags found
1 merge request!70change the way wisdem is installed to allow for upload to pypi
Pipeline #44573 failed
......@@ -5,7 +5,7 @@ test_hydesign:
stage:
test
script:
- pip install -e .[test]
- pip install .[test]
- python -m pytest
tags:
- linux
......
# 'filled_by_setup.py'
__version__ = '1.0.3'
__release__ = '1.0.3'
__version__ = '1.1.0'
__release__ = '1.1.0'
......@@ -5,6 +5,8 @@ Setup file for hydesign
import os
from setuptools import setup, find_packages
import pkg_resources
from setuptools.command.install import install
from subprocess import call
repo = os.path.dirname(__file__)
try:
......@@ -23,6 +25,14 @@ except ImportError:
def read_md(f): return open(f, 'r').read()
class CustomInstallCommand(install):
def run(self):
install.run(self)
call(['pip', 'install', 'wisdem', '--no-deps']) # install wisdem without dependencies as we only need CSM
import importlib
with open(importlib.util.find_spec('wisdem').origin, 'w') as f:
f.write('') # stop wisdem from running un-compiled fortran code when CSM is imported
setup(name='hydesign',
version=version,
......@@ -38,6 +48,8 @@ setup(name='hydesign',
author_email='jumu@dtu.dk',
license='MIT',
packages=find_packages(),
cmdclass={
'install': CustomInstallCommand},
package_data={
'hydesign': [
'tests/test_files/sm.pkl',
......@@ -69,7 +81,6 @@ setup(name='hydesign',
'statsmodels',
'rainflow',
'pyyaml',
'wisdem @ git+https://github.com/DTUWindEnergy/WISDEM.git@csm_only',
'matplotlib',
'zarr',
],
......
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