Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
WindEnergyToolbox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
toolbox
WindEnergyToolbox
Commits
3da86cb5
Commit
3da86cb5
authored
5 years ago
by
Mads M. Pedersen
Browse files
Options
Downloads
Patches
Plain Diff
update setup.py to retry without building extensions if first attempt fails
parent
92fb6060
No related branches found
No related tags found
No related merge requests found
Pipeline
#10427
passed
5 years ago
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
setup.py
+15
-8
15 additions, 8 deletions
setup.py
with
15 additions
and
8 deletions
setup.py
+
15
−
8
View file @
3da86cb5
...
...
@@ -12,10 +12,10 @@ from setuptools import setup, find_packages
repo
=
os
.
path
.
dirname
(
__file__
)
version
=
write_vers
(
vers_file
=
'
wetb/__init__.py
'
,
repo
=
repo
,
skip_chars
=
1
)
#try:
#
try:
# from pypandoc import convert_file
# read_md = lambda f: convert_file(f, 'rst', format='md')
#except ImportError:
#
except ImportError:
# print("warning: pypandoc module not found, could not convert Markdown to RST")
# read_md = lambda f: open(f, 'r').read()
with
open
(
"
README.md
"
,
"
r
"
)
as
fh
:
...
...
@@ -26,10 +26,12 @@ from distutils.extension import Extension
from
Cython.Distutils
import
build_ext
def
setup_package
():
ex_info
=
[(
'
wetb.fatigue_tools.rainflowcounting
'
,
[
'
pair_range
'
,
'
peak_trough
'
,
'
rainflowcount_astm
'
]),
(
'
wetb.signal.filters
'
,
[
'
cy_filters
'
])]
def
setup_package
(
build_ext
=
True
):
if
build_ext
:
ex_info
=
[(
'
wetb.fatigue_tools.rainflowcounting
'
,
[
'
pair_range
'
,
'
peak_trough
'
,
'
rainflowcount_astm
'
]),
(
'
wetb.signal.filters
'
,
[
'
cy_filters
'
])]
else
:
ex_info
=
[]
extlist
=
[
Extension
(
'
%s.%s
'
%
(
module
,
n
),
[
os
.
path
.
join
(
module
.
replace
(
"
.
"
,
"
/
"
),
n
)
+
'
.pyx
'
],
include_dirs
=
[
np
.
get_include
()])
for
module
,
names
in
ex_info
for
n
in
names
]
...
...
@@ -40,7 +42,7 @@ def setup_package():
'
tables
'
,
'
pytest
'
,
'
pytest-cov
'
,
# 'blosc', # gives an error - has to be pre-installed
# 'blosc', # gives an error - has to be pre-installed
'
pbr
'
,
'
paramiko
'
,
'
scipy
'
,
...
...
@@ -69,4 +71,9 @@ def setup_package():
if
__name__
==
"
__main__
"
:
setup_package
()
try
:
setup_package
()
except
:
setup_package
(
False
)
raise
Warning
(
"
WETB installed, but building extensions failed (i.e. it falls back on the slower pure python implementions)
"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment