Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TurTLE
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
Container registry
Model registry
Operate
Environments
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
TurTLE
TurTLE
Commits
d93071dc
Commit
d93071dc
authored
3 years ago
by
Cristian Lalescu
Browse files
Options
Downloads
Patches
Plain Diff
cleans up __init__.py and setup.py
parent
f5720cc6
No related branches found
No related tags found
No related merge requests found
Pipeline
#109395
passed
3 years ago
Stage: build
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+6
-1
6 additions, 1 deletion
CMakeLists.txt
TurTLE/__init__.py.in
+1
-18
1 addition, 18 deletions
TurTLE/__init__.py.in
setup.py.in
+3
-48
3 additions, 48 deletions
setup.py.in
with
10 additions
and
67 deletions
CMakeLists.txt
+
6
−
1
View file @
d93071dc
...
@@ -498,6 +498,11 @@ configure_file(
...
@@ -498,6 +498,11 @@ configure_file(
"
${
PROJECT_SOURCE_DIR
}
/TurTLE/__init__.py.in"
"
${
PROJECT_SOURCE_DIR
}
/TurTLE/__init__.py.in"
"
${
PROJECT_SOURCE_DIR
}
/TurTLE/__init__.py"
"
${
PROJECT_SOURCE_DIR
}
/TurTLE/__init__.py"
@ONLY
)
@ONLY
)
# update setup.py
configure_file
(
"
${
PROJECT_SOURCE_DIR
}
/setup.py.in"
"
${
PROJECT_BINARY_DIR
}
/python/setup.py"
@ONLY
)
# copy command
# copy command
install
(
CODE
"execute_process(COMMAND
${
CMAKE_COMMAND
}
-E copy_directory
${
PROJECT_SOURCE_DIR
}
/TurTLE
${
PROJECT_BINARY_DIR
}
/python/TurTLE/)"
)
install
(
CODE
"execute_process(COMMAND
${
CMAKE_COMMAND
}
-E copy_directory
${
PROJECT_SOURCE_DIR
}
/TurTLE
${
PROJECT_BINARY_DIR
}
/python/TurTLE/)"
)
if
(
EXISTS
"
${
PROJECT_BINARY_DIR
}
/host_info.py"
)
if
(
EXISTS
"
${
PROJECT_BINARY_DIR
}
/host_info.py"
)
...
@@ -509,7 +514,7 @@ else()
...
@@ -509,7 +514,7 @@ else()
install
(
CODE
"execute_process(COMMAND
${
CMAKE_COMMAND
}
-E copy
${
PROJECT_SOURCE_DIR
}
/pc_host_info.py
${
PROJECT_BINARY_DIR
}
/python/TurTLE/host_info.py)"
)
install
(
CODE
"execute_process(COMMAND
${
CMAKE_COMMAND
}
-E copy
${
PROJECT_SOURCE_DIR
}
/pc_host_info.py
${
PROJECT_BINARY_DIR
}
/python/TurTLE/host_info.py)"
)
endif
()
endif
()
endif
()
endif
()
install
(
CODE
"execute_process(COMMAND
${
PYTHON_EXECUTABLE
}
${
PROJECT_
SOURCE_DIR
}
/setup.py install --force --prefix=
${
CMAKE_INSTALL_PREFIX
}
WORKING_DIRECTORY
${
PROJECT_BINARY_DIR
}
/python/)"
)
install
(
CODE
"execute_process(COMMAND
${
PYTHON_EXECUTABLE
}
${
PROJECT_
BINARY_DIR
}
/python
/setup.py install --force --prefix=
${
CMAKE_INSTALL_PREFIX
}
WORKING_DIRECTORY
${
PROJECT_BINARY_DIR
}
/python/)"
)
#####################################################################################
#####################################################################################
...
...
This diff is collapsed.
Click to expand it.
TurTLE/__init__.py.in
+
1
−
18
View file @
d93071dc
...
@@ -24,28 +24,11 @@
...
@@ -24,28 +24,11 @@
import os
import os
import sys
import pickle
import pkg_resources
__version__ = '@TURTLE_VERSION_LONG@'
try:
__version__ = pkg_resources.require('TurTLE')[0].version
_dist = pkg_resources.get_distribution('TurTLE')
dist_loc = os.path.realpath(_dist.location)
lib_dir = os.path.join(dist_loc, 'TurTLE')
except:
__version__ = '@TURTLE_VERSION_LONG@'
dist_loc = None
lib_dir = None
data_dir = os.path.join('@CMAKE_INSTALL_PREFIX@', 'share/TurTLE-@TURTLE_VERSION_LONG@')
data_dir = os.path.join('@CMAKE_INSTALL_PREFIX@', 'share/TurTLE-@TURTLE_VERSION_LONG@')
here = os.path.normcase(__file__)
homefolder = os.path.expanduser('~')
from .host_info import host_info
from .host_info import host_info
from .DNS import DNS
from .DNS import DNS
...
...
This diff is collapsed.
Click to expand it.
setup.py
→
setup.py
.in
+
3
−
48
View file @
d93071dc
...
@@ -26,65 +26,20 @@
...
@@ -26,65 +26,20 @@
AUTHOR = 'Cristian C Lalescu'
AUTHOR = 'Cristian C Lalescu'
AUTHOR_EMAIL = 'Cristian.Lalescu@ds.mpg.de'
AUTHOR_EMAIL = 'Cristian.Lalescu@ds.mpg.de'
import
os
import
shutil
import
datetime
import
sys
import
subprocess
import pickle
import pickle
### package versioning
### package versioning
import
get_version
VERSION = '@TURTLE_VERSION_LONG@'
VERSION
=
get_version
.
main
()
print('This is TurTLE version ' + VERSION)
print('This is TurTLE version ' + VERSION)
import
distutils.cmd
class
CompileLibCommand
(
distutils
.
cmd
.
Command
):
description
=
'
Compile TurTLE library.
'
user_options
=
[
(
'
timing-output=
'
,
None
,
'
Toggle timing output.
'
),
(
'
fftw-estimate=
'
,
None
,
'
Use FFTW ESTIMATE.
'
),
(
'
split-fftw-many=
'
,
None
,
'
Turn on SPLIT_FFTW_MANY.
'
),
(
'
disable-fftw-omp=
'
,
None
,
'
Turn Off FFTW OpenMP.
'
),
]
def
initialize_options
(
self
):
self
.
timing_output
=
0
self
.
fftw_estimate
=
0
self
.
disable_fftw_omp
=
0
self
.
split_fftw_many
=
0
return
None
def
finalize_options
(
self
):
self
.
timing_output
=
(
int
(
self
.
timing_output
)
==
1
)
self
.
split_fftw_many
=
(
int
(
self
.
split_fftw_many
)
==
1
)
self
.
fftw_estimate
=
(
int
(
self
.
fftw_estimate
)
==
1
)
self
.
disable_fftw_omp
=
(
int
(
self
.
disable_fftw_omp
)
==
1
)
return
None
def
run
(
self
):
### save compiling information
pickle
.
dump
(
{
'
install_date
'
:
now
,
'
VERSION
'
:
VERSION
,
'
git_revision
'
:
git_revision
},
open
(
'
turtle/install_info.pickle
'
,
'
wb
'
),
protocol
=
2
)
return
None
from setuptools import setup
from setuptools import setup
setup(
setup(
name = 'TurTLE',
name = 'TurTLE',
packages = ['TurTLE', 'TurTLE/test'],
packages = ['TurTLE', 'TurTLE/test'],
install_requires = ['numpy>=1.8', 'h5py>=2.2.1'],
install_requires = ['numpy>=1.8', 'h5py>=2.2.1'],
package_data
=
{
'
TurTLE
'
:
[
'
test/B32p1e4_checkpoint_0.h5
'
,
# package data is installed by CMake
'
test/particle_set/NSVEparticle_set.hpp
'
,
#package_data = {'TurTLE': []},
'
test/particle_set/NSVEparticle_set.cpp
'
,
'
test/profiler/scalar_evolution.hpp
'
,
'
test/profiler/scalar_evolution.cpp
'
,
'
test/profiler/Kraichnan_scalar_v1.hpp
'
,
'
test/profiler/Kraichnan_scalar_v1.cpp
'
,
]},
entry_points = {
entry_points = {
'console_scripts': [
'console_scripts': [
'turtle = TurTLE.__main__:main',
'turtle = TurTLE.__main__:main',
...
...
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