another one

This commit is contained in:
Erik Frojdh
2020-02-13 16:57:12 +01:00
parent 990f32397b
commit 938d90bfb8
20 changed files with 19 additions and 15 deletions

View File

@ -15,5 +15,6 @@ echo "|<-------- starting python build"
# cp build/bin/_sls_detector* python/.
cd python
python setup.py install
${PYTHON} setup.py install
# python setup.py install
# $PYTHON setup.py install

View File

@ -72,6 +72,8 @@ outputs:
- {{ pin_subpackage('slsdetlib', exact=True) }}
- setuptools
host:
- python
run:
- libstdcxx-ng

View File

@ -12,7 +12,7 @@ file writing etc.
.. code-block:: python
from sls_detector import Eiger
from slsdet import Eiger
d = Eiger()
threshold = range(0, 2000, 200)

View File

@ -1,14 +1,14 @@
# find_package (Python COMPONENTS Interpreter Development)
pybind11_add_module(_sls_detector
pybind11_add_module(_slsdet
src/main.cpp
src/enums.cpp
src/detector.cpp
src/network.cpp
)
target_link_libraries(_sls_detector PUBLIC
target_link_libraries(_slsdet PUBLIC
slsDetectorShared
slsReceiverShared
slsSupportLib
@ -16,7 +16,7 @@ target_link_libraries(_sls_detector PUBLIC
set_target_properties(_sls_detector PROPERTIES
set_target_properties(_slsdet PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
)
@ -40,8 +40,8 @@ set( PYTHON_FILES
)
foreach(FILE ${PYTHON_FILES})
configure_file( sls_detector/${FILE}
${CMAKE_BINARY_DIR}/bin/sls_detector/${FILE} )
configure_file( slsdet/${FILE}
${CMAKE_BINARY_DIR}/bin/slsdet/${FILE} )
endforeach(FILE ${PYTHON_FILES})

View File

@ -8,7 +8,7 @@ import sys
import setuptools
import os
__version__ = 'developer'
__version__ = 'udp'
def get_conda_path():
@ -35,7 +35,7 @@ def get_conda_path():
ext_modules = [
Extension(
'_sls_detector',
'_slsdet',
['src/main.cpp',
'src/enums.cpp',
'src/detector.cpp',
@ -111,26 +111,27 @@ class BuildExt(build_ext):
for ext in self.extensions:
ext.extra_compile_args = opts
print('--------------')
print('**************************************************')
print(ct)
print(opts)
print('**************************************************')
build_ext.build_extensions(self)
def get_shared_lib():
return [f for f in os.listdir('.') if '_sls_detector' in f]
setup(
name='slsdetector',
name='slsdet',
version=__version__,
author='Erik Frojdh',
author_email='erik.frojdh@psi.ch',
url='https://github.com/slsdetectorgroup/sls_detector',
url='https://github.com/slsdetectorgroup/slsDetectorPackage',
description='Detector API for SLS Detector Group detectors',
long_description='',
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
ext_modules=ext_modules,
cmdclass={'build_ext': BuildExt},
packages=['sls_detector'],
# data_files = [('', get_shared_lib())],
zip_safe=False,
)

View File

@ -19,7 +19,7 @@ void init_enums(py::module &);
void init_experimental(py::module &);
void init_det(py::module &);
void init_network(py::module &);
PYBIND11_MODULE(_sls_detector, m) {
PYBIND11_MODULE(_slsdet, m) {
m.doc() = R"pbdoc(
C/C++ API
-----------------------