Skip to content

Commit

Permalink
copy cpp headers
Browse files Browse the repository at this point in the history
  • Loading branch information
JarrettSJohnson committed May 12, 2024
1 parent 8f3e188 commit 861643c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
shell: cmd
run: |-
CALL %CONDA_ROOT%\\Scripts\\activate.bat
conda install -y -c conda-forge -c schrodinger python cmake libpng freetype pyqt glew libxml2 numpy catch2=2.13.3 glm libnetcdf collada2gltf biopython pillow msgpack-c msgpack-python pytest
conda install -y -c conda-forge -c schrodinger python cmake libpng freetype pyqt glew libxml2 numpy catch2=2.13.3 glm libnetcdf collada2gltf biopython pillow msgpack-python pytest
- name: Conda info
shell: cmd
Expand All @@ -84,7 +84,9 @@ jobs:
shell: cmd
run: |
git clone --depth 1 https://github.com/rcsb/mmtf-cpp.git
cp -R mmtf-cpp/include/mmtf* include/
cp -R mmtf-cpp/include/mmtf* %CONDA_ROOT%/include/
git clone --depth 1 --single-branch --branch cpp_master https://github.com/msgpack/msgpack-c.git
cp -R msgpack-c/include/msgpack* %CONDA_ROOT%/include/
- name: Build PyMOL
shell: cmd
Expand Down Expand Up @@ -113,13 +115,15 @@ jobs:
bash $CONDA_ROOT.sh -b -p $CONDA_ROOT
export PATH="$CONDA_ROOT/bin:$PATH"
conda config --set quiet yes
conda install -y -c conda-forge -c schrodinger python cmake libpng freetype pyqt glew libxml2 numpy catch2=2.13.3 glm libnetcdf collada2gltf biopython pillow msgpack-c msgpack-python pytest
conda install -y -c conda-forge -c schrodinger python cmake libpng freetype pyqt glew libxml2 numpy catch2=2.13.3 glm libnetcdf collada2gltf biopython pillow msgpack-python pytest
conda info
- name: Get additional sources
run: |
git clone --depth 1 https://github.com/rcsb/mmtf-cpp.git
cp -R mmtf-cpp/include/mmtf* include/
cp -R mmtf-cpp/include/mmtf* ${CONDA_ROOT}/include/
git clone --depth 1 --single-branch --branch cpp_master https://github.com/msgpack/msgpack-c.git
cp -R msgpack-c/include/msgpack* ${CONDA_ROOT}/include/
- name: Build PyMOL
run: |-
Expand Down
23 changes: 12 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,18 @@ def is_conda_env():

def guess_msgpackc():
for prefix in prefix_path:
f = os.path.join(prefix, 'include', 'msgpack', 'version_master.h')

try:
m = re.search(r'MSGPACK_VERSION_MAJOR\s+(\d+)', open(f).read())
except EnvironmentError:
continue

if m is not None:
major = int(m.group(1))
if major > 1:
return 'c++11'
for suffix in ['h', 'hpp']:
f = os.path.join(prefix, 'include', 'msgpack', f'version_master.{suffix}')

try:
m = re.search(r'MSGPACK_VERSION_MAJOR\s+(\d+)', open(f).read())
except EnvironmentError:
continue

if m is not None:
major = int(m.group(1))
if major > 1:
return 'c++11'

return 'no'

Expand Down

0 comments on commit 861643c

Please sign in to comment.