Skip to content

Commit 47c3f43

Browse files
committed
conda recipe for local builds
1 parent d6431fa commit 47c3f43

File tree

4 files changed

+70
-180
lines changed

4 files changed

+70
-180
lines changed

README.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -60,30 +60,6 @@ conda install PySide2 PyOpenGL
6060
pip install git+https://github.com/compas-dev/compas_viewers.git#egg=compas_viewers
6161
```
6262

63-
## Cmake
64-
65-
The project has three levels of `CMakeLists.txt` files.
66-
67-
### /CMakeLists.txt
68-
69-
The top level file is located at the root of the project.
70-
71-
### /modules/CMakeLists.txt
72-
73-
The second level file is in the `modules` folder. If you add a new wrapper module, make sure to register it in this file as well.
74-
75-
```make
76-
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/xxx)
77-
```
78-
79-
### /modules/xxx/CMakeLists.txt
80-
81-
Finally there is a `CMakeLists` file per wrapper module. There the most relevant part is to link the correct libraries. For example, the module that wraps `libigl`'s boolean operations requires `CGAL` and this should thus be reflected in the file.
82-
83-
```make
84-
target_link_libraries(booleans PRIVATE igl::cgal)
85-
```
86-
8763
## Compile & Install
8864

8965
On Mac
@@ -96,7 +72,7 @@ On Windows
9672
* `rmdir build /s`
9773
* `pip install -e .`
9874

99-
## check Installation
75+
## Check Installation
10076

10177
To verify, start an interactive python session and import the package. This should not throw any errors.
10278

@@ -131,6 +107,30 @@ To build `compas_libigl` with support for boolean operations, modify the followi
131107
* uncomment line 5 (`# from .booleans import *`)
132108
* uncomment line 6 (`# from .csgtree import *`)
133109

110+
## Cmake
111+
112+
The project has three levels of `CMakeLists.txt` files.
113+
114+
### /CMakeLists.txt
115+
116+
The top level file is located at the root of the project.
117+
118+
### /modules/CMakeLists.txt
119+
120+
The second level file is in the `modules` folder. If you add a new wrapper module, make sure to register it in this file as well.
121+
122+
```make
123+
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/xxx)
124+
```
125+
126+
### /modules/xxx/CMakeLists.txt
127+
128+
Finally there is a `CMakeLists` file per wrapper module. There the most relevant part is to link the correct libraries. For example, the module that wraps `libigl`'s boolean operations requires `CGAL` and this should thus be reflected in the file.
129+
130+
```make
131+
target_link_libraries(booleans PRIVATE igl::cgal)
132+
```
133+
134134
## Notes
135135

136136
### Related projects

README.md_

Lines changed: 0 additions & 150 deletions
This file was deleted.

recipe/meta.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{% set name = "compas_libigl" %}
2+
{% set version = "0.1.0" %}
3+
4+
package:
5+
name: {{ name }}
6+
version: {{ version }}
7+
8+
source:
9+
path: $RECIPE_DIR/../../
10+
11+
build:
12+
number: 0
13+
script: {{ PYTHON }} -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv
14+
15+
requirements:
16+
build:
17+
- boost
18+
- cmake
19+
- git
20+
host:
21+
- python
22+
- pip
23+
run:
24+
- COMPAS >=0.15.5
25+
26+
test:
27+
imports:
28+
- compas_libigl
29+
30+
about:
31+
home: https://github.com/blockresearchgroup/compas_libigl
32+
license: MIT
33+
summary: 'COMPAS friendly wrappers for libigl functions.'
34+
dev_url: https://github.com/blockresearchgroup/compas_libigl
35+
doc_url: https://blockresearchgroup.github.io/compas_libigl
36+
doc_source_url: https://github.com/blockresearchgroup/compas_libigl/blob/master/README.rst
37+
38+
extra:
39+
recipe-maintainers:
40+
- brgcode

setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@ def read(*names, **kwargs):
2424
encoding=kwargs.get('encoding', 'utf8')
2525
).read()
2626

27+
2728
class CMakeExtension(Extension):
2829
def __init__(self, name, sourcedir=''):
2930
Extension.__init__(self, name, sources=[])
3031
self.sourcedir = os.path.abspath(sourcedir)
3132

3233

3334
class CMakeBuild(build_ext):
35+
3436
def run(self):
3537
try:
3638
out = subprocess.check_output(['cmake', '--version'])
@@ -83,6 +85,7 @@ def build_extension(self, ext):
8385
requirements = read('requirements.txt').split('\n')
8486
optional_requirements = {}
8587

88+
8689
setup(
8790
name='compas_libigl',
8891
version='0.1.0',
@@ -102,12 +105,9 @@ def build_extension(self, ext):
102105
'Operating System :: POSIX',
103106
'Operating System :: Microsoft :: Windows',
104107
'Programming Language :: Python',
105-
'Programming Language :: Python :: 2.7',
106-
'Programming Language :: Python :: 3',
107-
'Programming Language :: Python :: 3.4',
108-
'Programming Language :: Python :: 3.5',
109108
'Programming Language :: Python :: 3.6',
110109
'Programming Language :: Python :: 3.7',
110+
'Programming Language :: Python :: 3.8',
111111
'Programming Language :: Python :: Implementation :: CPython',
112112
],
113113
keywords=[],
@@ -119,7 +119,7 @@ def build_extension(self, ext):
119119
include_package_data=True,
120120
zip_safe=False,
121121
install_requires=requirements,
122-
python_requires='>=2.7',
122+
python_requires='>=3.6',
123123
extras_require=optional_requirements,
124124
entry_points={
125125
'console_scripts': [],

0 commit comments

Comments
 (0)