Skip to content

Commit 53b64ff

Browse files
abellgithubhobu
andauthored
Include nlohmann before PDAL. (#12)
* Include nlohmann before PDAL. * use miniforge3 to build * add our own export.hpp for situations where PDAL didn't provide it --------- Co-authored-by: Howard Butler <[email protected]>
1 parent b00cc4e commit 53b64ff

File tree

6 files changed

+35
-8
lines changed

6 files changed

+35
-8
lines changed

.github/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ channels:
44
dependencies:
55
- scikit-build-core
66
- numpy
7-
- pdal
7+
- libpdal-core
88
- compilers
99
- python
1010
- pip

.github/workflows/build.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@ jobs:
2424
fail-fast: true
2525
matrix:
2626
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
27-
python-version: ['3.9', '3.10', '3.11', '3.12']
28-
numpy-version: ['1.26', '2.0', '2.1']
27+
python-version: ['3.10', '3.11', '3.12', '3.13']
28+
numpy-version: ['1.24', '2.1']
2929
exclude:
30-
- python-version: 3.9
31-
numpy-version: 2.1
30+
- python-version: '3.12'
31+
numpy-version: '1.24'
32+
- python-version: '3.13'
33+
numpy-version: '1.24'
3234

3335
steps:
3436
- name: Check out
@@ -37,7 +39,7 @@ jobs:
3739
- name: Setup micromamba
3840
uses: conda-incubator/setup-miniconda@v3
3941
with:
40-
miniforge-variant: Mambaforge
42+
miniforge-variant: Miniforge3
4143
miniforge-version: latest
4244
use-mamba: true
4345
python-version: ${{ matrix.python-version }}

src/pdal/filters/PythonFilter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
* OF SUCH DAMAGE.
3333
****************************************************************************/
3434

35-
#include "PythonFilter.hpp"
36-
3735
#include "../nlohmann/json.hpp"
3836

37+
#include "PythonFilter.hpp"
38+
3939
#include <pdal/PointView.hpp>
4040
#include <pdal/DimUtil.hpp>
4141
#include <pdal/util/ProgramArgs.hpp>

src/pdal/filters/export.hpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#pragma once
2+
3+
4+
#ifdef _WIN32
5+
# define PDAL_EXPORT __declspec(dllexport)
6+
# define PDAL_LOCAL
7+
# define PDAL_EXPORT_UNIX
8+
#ifdef __GNUC__
9+
# define PDAL_EXPORT_DEPRECATED __attribute__((deprecated)) PDAL_EXPORT
10+
#else
11+
# define PDAL_EXPORT_DEPRECATED __declspec(deprecated, dllexport)
12+
#endif
13+
#else
14+
# define PDAL_EXPORT __attribute__ ((visibility("default")))
15+
// Keep the PDAL_DLL name around so any external plugins that still might have that defined
16+
// can still compile and be used
17+
# define PDAL_DLL PDAL_EXPORT
18+
# define PDAL_LOCAL __attribute__((visibility("hidden")))
19+
# define PDAL_EXPORT_UNIX __attribute__ ((visibility("default")))
20+
# define PDAL_EXPORT_DEPRECATED __attribute__((deprecated))
21+
#endif // _WIN32

src/pdal/test/NumpyReaderTest.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434

3535
#include <pdal/pdal_test_main.hpp>
3636

37+
#include "../filters/export.hpp"
38+
3739
#include <pdal/PipelineManager.hpp>
3840
#include <pdal/StageFactory.hpp>
3941
#include <pdal/filters/StatsFilter.hpp>

src/pdal/test/PythonFilterTest.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434

3535
#include <pdal/pdal_test_main.hpp>
3636

37+
#include "../filters/export.hpp"
38+
3739
#include <pdal/PipelineManager.hpp>
3840
#include <pdal/StageFactory.hpp>
3941
#include <pdal/io/FauxReader.hpp>

0 commit comments

Comments
 (0)