Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moose
Manage
Activity
Members
Labels
Plan
Issues
9
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sahil Moza
moose
Commits
b09a3ba2
Commit
b09a3ba2
authored
7 years ago
by
Dilawar Singh
Browse files
Options
Downloads
Patches
Plain Diff
Tweaks to setup.cmake.py file.
parent
168cec89
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+6
-2
6 additions, 2 deletions
CMakeLists.txt
moose-core/CMakeLists.txt
+1
-1
1 addition, 1 deletion
moose-core/CMakeLists.txt
moose-core/python/setup.cmake.py
+15
-13
15 additions, 13 deletions
moose-core/python/setup.cmake.py
with
22 additions
and
16 deletions
CMakeLists.txt
+
6
−
2
View file @
b09a3ba2
...
@@ -58,6 +58,10 @@ add_custom_target(moose ALL)
...
@@ -58,6 +58,10 @@ add_custom_target(moose ALL)
set
(
PYMOOSE_SOURCE_DIR
"
${
CMAKE_SOURCE_DIR
}
/moose-core"
)
set
(
PYMOOSE_SOURCE_DIR
"
${
CMAKE_SOURCE_DIR
}
/moose-core"
)
set
(
PYMOOSE_BUILD_DIR
${
CMAKE_BINARY_DIR
}
/__moose-core_build
)
set
(
PYMOOSE_BUILD_DIR
${
CMAKE_BINARY_DIR
}
/__moose-core_build
)
# NOTE: new setuptools does not install python module to this directory unless
# it supports .pth file or PYTHONPATH points to it. Make sure when moose-core is
# installing into user_specified path, set PYTHONPATH to this directory.
set
(
PYMOOSE_INSTALL_DIR
${
CMAKE_BINARY_DIR
}
/__moose-core_install
)
set
(
PYMOOSE_INSTALL_DIR
${
CMAKE_BINARY_DIR
}
/__moose-core_install
)
if
(
WITH_GUI
)
if
(
WITH_GUI
)
...
@@ -105,8 +109,8 @@ if(WITH_GUI)
...
@@ -105,8 +109,8 @@ if(WITH_GUI)
endif
()
endif
()
#
# moose-gui
# moose-gui
#
# TODO: moose-gui should be a python module.
# TODO: moose-gui should be a python module.
set
(
MOOSE_GUI_DIR
${
CMAKE_SOURCE_DIR
}
/moose-gui
)
set
(
MOOSE_GUI_DIR
${
CMAKE_SOURCE_DIR
}
/moose-gui
)
install
(
DIRECTORY
${
PYMOOSE_INSTALL_DIR
}
/
install
(
DIRECTORY
${
PYMOOSE_INSTALL_DIR
}
/
...
...
This diff is collapsed.
Click to expand it.
moose-core/CMakeLists.txt
+
1
−
1
View file @
b09a3ba2
...
@@ -434,7 +434,7 @@ endif( )
...
@@ -434,7 +434,7 @@ endif( )
# --user to install in user home.
# --user to install in user home.
install
(
CODE
install
(
CODE
"execute_process(
"execute_process(
COMMAND
${
PYTHON_EXECUTABLE
}
setup.cmake.py install
${
EXTRA_ARGS
}
${
PYMOOSE_EXTRA_INSTALL_ARGS
}
COMMAND
${
PYTHON_EXECUTABLE
}
setup.cmake.py install
-f
${
EXTRA_ARGS
}
${
PYMOOSE_EXTRA_INSTALL_ARGS
}
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/python
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/python
)"
)"
)
)
...
...
This diff is collapsed.
Click to expand it.
moose-core/python/setup.cmake.py
+
15
−
13
View file @
b09a3ba2
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
"""
setup.py:
"""
Script to install python targets.
setup.cmake.py:
NOTE: This script is to be called by CMake. Not intended to be used standalon
e.
Script to install python targets by cmak
e.
DO NOT USE IT DIRECTLY. Only `cmake` build system should use it directly.
"""
"""
__author__
=
"
Dilawar Singh
"
__author__
=
"
Dilawar Singh
"
...
@@ -20,33 +21,32 @@ import os
...
@@ -20,33 +21,32 @@ import os
import
sys
import
sys
try
:
try
:
from
setuptools
import
setup
from
setuptools
import
setup
except
Exception
as
e
:
except
Exception
as
e
:
from
distutils.core
import
setup
from
distutils.core
import
setup
script_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)
)
script_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)
)
version
=
'
3.2pre1
'
version
=
'
3.2.0-git
'
try
:
try
:
with
open
(
os
.
path
.
join
(
script_dir
,
'
VERSION
'
),
'
r
'
)
as
f
:
with
open
(
os
.
path
.
join
(
script_dir
,
'
VERSION
'
),
'
r
'
)
as
f
:
version
=
f
.
read
(
)
version
=
f
.
read
(
)
except
Exception
as
e
:
except
Exception
as
e
:
print
(
'
Failed to read VERSION %s
'
%
e
)
print
(
'
Failed to read VERSION
from file due to:
%s
'
%
e
)
print
(
'
Using default %s
'
%
version
)
print
(
'
Using default %s
'
%
version
)
try
:
try
:
import
importlib.machinery
import
importlib.machinery
suffix
=
importlib
.
machinery
.
EXTENSION_SUFFIXES
[
0
]
suffix
=
importlib
.
machinery
.
EXTENSION_SUFFIXES
[
0
]
except
Exception
as
e
:
except
Exception
as
e
:
print
(
'
[WARN] Failed to determine importlib suffix
'
)
print
(
'
[WARN] Failed to determine importlib suffix
due to %s
'
%
e
)
suffix
=
'
.so
'
suffix
=
'
.so
'
setup
(
setup
(
name
=
'
pymoose
'
,
name
=
'
pymoose
'
,
version
=
version
,
version
=
version
,
description
=
'
Python scripting interface of MOOSE Simulator (https://moose.ncbs.res.in)
'
,
description
=
'
Python scripting interface of MOOSE Simulator (https://moose.ncbs.res.in)
'
,
author
=
'
MOOSERes
'
,
author
=
'
See AUTHORS.md at https://github.com/BhallaLab/moose
'
,
author_email
=
'
bhalla@ncbs.res.in
'
,
author_email
=
'
bhalla@ncbs.res.in
'
,
maintainer
=
'
Dilawar Singh
'
,
maintainer
=
'
Dilawar Singh
'
,
maintainer_email
=
'
dilawars@ncbs.res.in
'
,
maintainer_email
=
'
dilawars@ncbs.res.in
'
,
...
@@ -61,9 +61,11 @@ setup(
...
@@ -61,9 +61,11 @@ setup(
,
'
moose.chemUtil
'
,
'
moose.chemUtil
'
,
'
moose.chemMerge
'
,
'
moose.chemMerge
'
],
],
install_requires
=
[
'
python-libsbml
'
,
'
numpy
'
],
install_requires
=
[
'
python-libsbml
'
,
'
numpy
'
],
package_dir
=
{
package_dir
=
{
'
moose
'
:
'
moose
'
,
'
rdesigneur
'
:
'
rdesigneur
'
'
moose
'
:
'
moose
'
,
'
rdesigneur
'
:
'
rdesigneur
'
},
},
package_data
=
{
'
moose
'
:
[
'
_moose
'
+
suffix
,
'
neuroml2/schema/NeuroMLCoreDimensions.xml
'
]
},
package_data
=
{
)
'
moose
'
:
[
'
_moose
'
+
suffix
,
'
neuroml2/schema/NeuroMLCoreDimensions.xml
'
]
},
)
This diff is collapsed.
Click to expand it.
Preview
0%
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