Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pycalibration
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Contributor 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
calibration
pycalibration
Commits
e53e1b1d
Commit
e53e1b1d
authored
4 years ago
by
Robert Rosca
Browse files
Options
Downloads
Patches
Plain Diff
Use importlib to check if XFELDetAna is installed
parent
0b61184d
No related branches found
Branches containing commit
No related tags found
1 merge request
!437
Fix/requirements into setuppy
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
setup.py
+8
-11
8 additions, 11 deletions
setup.py
with
8 additions
and
11 deletions
setup.py
+
8
−
11
View file @
e53e1b1d
import
importlib
import
sys
from
distutils.command.build
import
build
from
distutils.extension
import
Extension
...
...
@@ -28,20 +29,15 @@ class PostInstallCommand(install):
python_path
=
sys
.
executable
if
"
karabo
"
in
python_path
:
print
(
"
Karabo installation detected, checking for PyDetLib installation
"
)
try
:
import
XFELDetAna
print
(
"
...found!
"
)
return
except
ImportError
:
"
No PyDetLib installation found, attempting to install
"
if
importlib
.
util
.
find_spec
(
"
XFELDetAna
"
)
is
None
:
print
(
"
No PyDetLib installation found, attempting to install
"
)
check_call
(
"
karabo -g https://in.xfel.eu/gitlab install pyDetLib master
"
.
split
()
)
else
:
print
(
"
Python environment seems to not be a Karabo environment.
"
+
"
Please
install PyDetLib manually.
"
"
Python environment seems to not be a Karabo environment.
Please
"
"
install PyDetLib manually.
"
)
...
...
@@ -92,7 +88,8 @@ setup(
"
bin/*.sh
"
,
"
titlepage.tmpl
"
,
"
xfel.pdf
"
,
]
+
data_files
]
+
data_files
},
entry_points
=
{
"
console_scripts
"
:
[
...
...
@@ -164,7 +161,7 @@ setup(
"
dev
"
:
[
"
nbqa[toolchain]
"
,
"
pre-commit
"
,
]
]
,
},
python_requires
=
"
>=3.6
"
,
classifiers
=
[
...
...
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