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
4b871568
Commit
4b871568
authored
9 years ago
by
Chichi Lalescu
Browse files
Options
Downloads
Patches
Plain Diff
add more detailed version info
parent
45c30d41
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bfps/__init__.py
+7
-4
7 additions, 4 deletions
bfps/__init__.py
setup.py
+18
-3
18 additions, 3 deletions
setup.py
with
25 additions
and
7 deletions
bfps/__init__.py
+
7
−
4
View file @
4b871568
...
...
@@ -38,15 +38,18 @@ try:
lib_dir
=
_dist
.
location
__version__
=
_dist
.
version
except
DistributionNotFound
:
__version__
=
'
Please install this project with setup.py
'
#import subprocess
#__version__ = 'git revision ' + subprocess.check_output(['git', 'rev-parse', 'HEAD']).strip()
__version__
=
''
machine_settings
=
pickle
.
load
(
open
(
os
.
path
.
join
(
os
.
path
.
join
(
dist_loc
,
'
bfps
'
),
open
(
os
.
path
.
join
(
os
.
path
.
dirname
(
here
),
'
machine_settings.pickle
'
),
'
r
'
))
version_info
=
pickle
.
load
(
open
(
os
.
path
.
join
(
os
.
path
.
dirname
(
here
),
'
version_info.pickle
'
),
'
r
'
))
from
.code
import
code
from
.NavierStokes
import
NavierStokes
from
.fluid_converter
import
fluid_converter
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
18
−
3
View file @
4b871568
...
...
@@ -24,8 +24,8 @@ from machine_settings import include_dirs, library_dirs, extra_compile_args
import
pickle
pickle
.
dump
(
{
'
include_dirs
'
:
include_dirs
,
'
library_dirs
'
:
library_dirs
,
'
extra_compile_args
'
:
extra_compile_args
},
'
library_dirs
'
:
library_dirs
,
'
extra_compile_args
'
:
extra_compile_args
},
open
(
'
bfps/machine_settings.pickle
'
,
'
wb
'
),
protocol
=
2
)
...
...
@@ -34,8 +34,22 @@ AUTHOR = 'Cristian C Lalescu'
AUTHOR_EMAIL
=
'
Cristian.Lalescu@ds.mpg.de
'
import
datetime
import
subprocess
from
subprocess
import
CalledProcessError
now
=
datetime
.
datetime
.
now
()
date_name
=
'
{0:0>4}{1:0>2}{2:0>2}
'
.
format
(
now
.
year
,
now
.
month
,
now
.
day
)
try
:
git_revision
=
subprocess
.
check_output
([
'
git
'
,
'
rev-parse
'
,
'
HEAD
'
]).
strip
()
except
CalledProcessError
:
git_revision
=
''
pickle
.
dump
(
{
'
install_date
'
:
now
,
'
git_revision
'
:
git_revision
},
open
(
'
bfps/version_info.pickle
'
,
'
wb
'
),
protocol
=
2
)
VERSION
=
date_name
src_file_list
=
[
'
field_descriptor
'
,
...
...
@@ -77,7 +91,8 @@ setup(
install_requires
=
[
'
numpy>=1.8
'
,
'
matplotlib>=1.3
'
],
ext_modules
=
[
libbfps
],
package_data
=
{
'
bfps
'
:
header_list
+
[
'
../machine_settings.py
'
,
'
machine_settings.pickle
'
]},
'
machine_settings.pickle
'
,
'
version_info.pickle
'
]},
########################################################################
# useless stuff folows
########################################################################
...
...
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