Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container 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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
9039d454
Commit
9039d454
authored
11 years ago
by
Pospelov, Gennady
Browse files
Options
Downloads
Patches
Plain Diff
PythonAPI and corresponding functional tests are fully working from Windows
parent
f8bb6d63
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
BornAgain.pro
+1
-1
1 addition, 1 deletion
BornAgain.pro
Core/Core.pro
+9
-0
9 additions, 0 deletions
Core/Core.pro
Fit/Fit.pro
+10
-1
10 additions, 1 deletion
Fit/Fit.pro
shared.pri
+28
-13
28 additions, 13 deletions
shared.pri
with
48 additions
and
15 deletions
BornAgain.pro
+
1
−
1
View file @
9039d454
...
...
@@ -5,7 +5,7 @@ include($$PWD/shared.pri)
SUBDIRS
+=
Core
SUBDIRS
+=
ThirdParty
/
gtest
SUBDIRS
+=
Tests
/
UnitTests
/
TestCore
#
TestCore
.
depends
=
ThirdParty
/
gtest
TestCore
.
depends
=
ThirdParty
/
gtest
SUBDIRS
+=
Tests
/
FunctionalTests
/
TestCore
...
...
This diff is collapsed.
Click to expand it.
Core/Core.pro
+
9
−
0
View file @
9039d454
...
...
@@ -349,5 +349,14 @@ target.path = $$PWD/../lib
INSTALLS
+=
target
QMAKE_DISTCLEAN
+=
$$
target
.
path
/
$
(
TARGET
)
isEmpty
(
MAKEFILE
)
:
MAKEFILE
=
"Makefile"
#
for
python
import
in
Windows
we
need
another
extention
and
preffix
win32
{
extra_install
.
path
=
$$
PWD
\
..
\
lib
extra_install
.
extra
=
$
(
COPY
)
/
y
\
"release\BornAgainCore.dll\"
\
"release\libBornAgainCore.pyd\"
extra_install
.
files
=
$$
PWD
\
release
\
libBornAgainCore
.
pyd
INSTALLS
+=
extra_install
}
QMAKE_POST_LINK
=
$$
MAKE_COMMAND
-
f
$$
{
MAKEFILE
}
install
This diff is collapsed.
Click to expand it.
Fit/Fit.pro
+
10
−
1
View file @
9039d454
...
...
@@ -96,5 +96,14 @@ target.path = $$PWD/../lib
INSTALLS
+=
target
QMAKE_DISTCLEAN
+=
$$
target
.
path
/
$
(
TARGET
)
isEmpty
(
MAKEFILE
)
:
MAKEFILE
=
"Makefile"
QMAKE_POST_LINK
=
$$
MAKE_COMMAND
-
f
$$
{
MAKEFILE
}
install
#
for
python
import
in
Windows
we
need
another
extention
and
preffix
win32
{
extra_install
.
path
=
$$
PWD
\
..
\
lib
extra_install
.
extra
=
$
(
COPY
)
/
y
\
"release\BornAgainFit.dll\"
\
"release\libBornAgainFit.pyd\"
extra_install
.
files
=
$$
PWD
\
release
\
libBornAgainFit
.
pyd
INSTALLS
+=
extra_install
}
QMAKE_POST_LINK
+=
$$
MAKE_COMMAND
-
f
$$
{
MAKEFILE
}
install
This diff is collapsed.
Click to expand it.
shared.pri
+
28
−
13
View file @
9039d454
...
...
@@ -2,7 +2,7 @@
# Common settings for all BornAgain compilations
# -----------------------------------------------------------------------------
#
CONFIG += BORNAGAIN_PYTHON # provide python bindings compilation
CONFIG += BORNAGAIN_PYTHON # provide python bindings compilation
win32 {
MAKE_COMMAND = mingw32-make
...
...
@@ -279,26 +279,42 @@ CONFIG(BORNAGAIN_PYTHON) {
WhichPython=$$system(which python)
}
win32 {
WhichPython="C:/Python27"
WhichPython="C:/Python27
/python.exe
"
}
isEmpty(WhichPython) {
# we do not have python
error("Can not find any sign of python")
} else {
#pythonsysincdir=$$system("$${WhichPython} -c \"import sys; sys.stdout.write(sys.prefix + \'/include/python\' + sys.version[:3])\" ")
#pythonsyslibdir=$$system("$${WhichPython} -c \"import sys; sys.stdout.write(sys.prefix + \'/libs\' )\" ")
pythonvers=$$system("$${WhichPython} -c \"import sys; sys.stdout.write(sys.version[:3])\" ")
pythonnumpy=$$system("$${WhichPython} -c \"import sys; import numpy; sys.stdout.write(numpy.get_include())\" ")
# we have python
pythonvers=$$system("python -c \"import sys; sys.stdout.write(sys.version[:3])\" ")
macx|unix {
pythonsysincdir=$$system("python -c 'import sys; sys.stdout.write(sys.prefix + \"/include/python\" + sys.version[:3])'")
pythonsyslibdir=$$system("python -c 'import sys; sys.stdout.write(sys.prefix + \"/lib\" )'")
pythonsysincdir=$$system("$${WhichPython} -c \"import sys; sys.stdout.write(sys.prefix + \'/include/python\' + sys.version[:3])\" ")
pythonsyslibdir=$$system("$${WhichPython} -c \"import sys; sys.stdout.write(sys.prefix + \'/lib\' )\" ")
# pythonvers=$$system("python -c \"import sys; sys.stdout.write(sys.version[:3])\" ")
# pythonsysincdir=$$system("python -c 'import sys; sys.stdout.write(sys.prefix + \"/include/python\" + sys.version[:3])'")
# pythonsyslibdir=$$system("python -c 'import sys; sys.stdout.write(sys.prefix + \"/lib\" )'")
# pythonnumpy=$$system("python -c \"import sys; import numpy; sys.stdout.write(numpy.get_include())\" ")
}
win32 {
pythonsysincdir=$${WhichPython}/include
pythonsyslibdir=$${WhichPython}/libs
pythonsysincdir=$$system("$${WhichPython} -c \"import sys; sys.stdout.write(sys.prefix + \'/include')\" ")
pythonsyslibdir=$$system("$${WhichPython} -c \"import sys; sys.stdout.write(sys.prefix + \'/libs\' )\" ")
# pythonsysincdir=$${WhichPython}/include
# pythonsyslibdir=$${WhichPython}/libs
# pythonvers=$$system("$${WhichPython}/python.exe -c \"import sys; sys.stdout.write(sys.version[:3])\" ")
# pythonnumpy=$$system("$${WhichPython}/python.exe -c \"import sys; import numpy; sys.stdout.write(numpy.get_include())\" ")
}
message(we have python)
message($$pythonvers)
message($$pythonsysincdir)
message($$pythonsyslibdir)
# pythonsysincdir=$$system("$${WhichPython} -c \"import sys; sys.stdout.write(sys.prefix + \'/include/python\' + sys.version[:3])\" ")
# pythonsyslibdir=$$system("$${WhichPython} -c \"import sys; sys.stdout.write(sys.prefix + \'/libs\' )\" ")
# pythonvers=$$system("$${WhichPython} -c \"import sys; sys.stdout.write(sys.version[:3])\" ")
# pythonnumpy=$$system("$${WhichPython} -c \"import sys; import numpy; sys.stdout.write(numpy.get_include())\" ")
message(pythonvers : $$pythonvers)
message(pythoninc : $$pythonsysincdir)
message(pythonlib : $$pythonsyslibdir)
message(pythonnumpy: $$pythonnumpy)
lessThan(pythonvers, 2.6): error("BornAgain requires python 2.6 or greater")
INCLUDEPATH += $$pythonsysincdir
#LIBS += -L$$pythonsyslibdir -lpython$$pythonvers -lboost_python
...
...
@@ -308,10 +324,9 @@ CONFIG(BORNAGAIN_PYTHON) {
win32 {
PYTHON_LIB_DIRECTIVE="-lpython27"
}
LIBS += -lboost_python -L$$pythonsyslibdir $$PYTHON_LIB_DIRECTIVE
LIBS += -lboost_python
$${BOOST_LIB_SUFFIX}
-L$$pythonsyslibdir $$PYTHON_LIB_DIRECTIVE
# we need to know the location of numpy
pythonnumpy=$$system("python -c \"import sys; import numpy; sys.stdout.write(numpy.get_include())\" ")
!exists($$pythonnumpy/numpy/arrayobject.h): error("Can't find numpy/arrayobject.h in $$pythonnumpy, you have to install python-numpy-devel")
INCLUDEPATH += $$pythonnumpy
}
...
...
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