Skip to content

Commit

Permalink
Fix cxx lib release on github, bump version [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
vespakoen committed Dec 18, 2022
1 parent 9849ac0 commit 94f1f31
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 18 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -399,13 +399,11 @@ jobs:
- uses: actions/download-artifact@v3
with:
path: prebuilds
- name: prepare wheels
- name: prepare
shell: bash
run: |
find prebuilds
mkdir dist
mv prebuilds/*-python-*/* dist
ls dist
- name: Publish wheels to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down Expand Up @@ -433,9 +431,14 @@ jobs:
- uses: actions/download-artifact@v3
with:
path: prebuilds
- name: prepare
shell: bash
run: |
mkdir dist
mv prebuilds/*-cxx-*/* dist
- name: Release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: |
prebuilds/*-cxx-*
dist/*
15 changes: 10 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Note that pip / pip3 is will install packages for to the system installation of
/path/to/your/custom/python -m pip install opencamlib
Lastly, if you don't know where Python is, but you have access to it's interpreter (FreeCAD and Blender both have a Python console), you can simply enter this command in there to install opencamlib:
If you don't know where Python is, but you have access to it's interpreter (FreeCAD and Blender both have a Python console), you can simply enter this command in there to install OpenCAMLib:

.. code-block:: python
Expand All @@ -118,12 +118,15 @@ Or, using yarn:
yarn add @opencamlib/opencamlib
Note that it is not 100% feature complete and lacking some functionality still.

===
C++
===

Precompiled C++ libraries are available on the Github Releases page (https://github.com/aewallin/opencamlib/releases).
Pre-compiled C++ libraries are available on the Github Releases page (https://github.com/aewallin/opencamlib/releases).
This project also installs a OpenCAMLibConfig.cmake, which, if your project uses CMake, allows you to use ``find_package(OpenCAMLib REQUIRED)``.

You can see an example of that in use over here: ``examples/cpp/test/CMakeLists.txt``

********************
Expand Down Expand Up @@ -215,7 +218,7 @@ To compile the emscripten library, first download, install and activate it using
./emsdk install latest
./emsdk activate latest
Now you can compile opencamlib like this (make sure to replace the ``path/to/`` sections):
Now you can compile OpenCAMLib like this (make sure to replace the ``path/to/`` sections):

.. code-block:: shell
Expand All @@ -233,7 +236,7 @@ Now you can compile opencamlib like this (make sure to replace the ``path/to/``
..
emmake make # try emmake make -j4 for a faster build if you have a multi-core machine
Note that USE_OPENMP has been turned off, OpenMP is not supported with Emscripten at the moment
Note that ``USE_OPENMP`` has been turned off, OpenMP is not supported with Emscripten at the moment

====================
Building for Node.js
Expand Down Expand Up @@ -271,7 +274,7 @@ Building for Python

The Python library can be compiled similarly to the C++ example above, however, this time Boost.Python has to be compiled first.
Most systems have Boost.Python available as a download, but only for a specific Python version only (usually the latest Python version).
These might work if you are using Python from the same package, unfortunately, this is not a very reliable method, so compiling them yourself is usually the best option.
These might work if you are using Python from the same package provider, but, unfortunately, this is not a very reliable method, so compiling them yourself is usually the best option.

First, download and extract Boost:

Expand Down Expand Up @@ -313,6 +316,8 @@ Usage
Please take a look at the ``examples/`` folder on how to use OpenCAMLib.
For each language there is an example named ``test`` which calls all of the algorithms.

There is also some API documentation over here: https://opencamlib.readthedocs.io

***************
Common Problems
***************
Expand Down
8 changes: 3 additions & 5 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,9 @@ download_boost() {
fi
prettyprint "Extracting boost.tar.gz..."
tar -zxf "${TMPDIR:-"/tmp"}/boost.tar.gz" -C .
(
prettyprint "Applying boost-python-3.11.patch"
cd boost_1_80_0/libs/python
git apply --ignore-space-change --ignore-whitespace "${project_dir}/.github/patches/boost-python-3.11.patch"
)

prettyprint "Applying boost-python-3.11.patch"
git apply --ignore-space-change --ignore-whitespace --directory "boost_1_80_0/libs/python" "${project_dir}/.github/patches/boost-python-3.11.patch"
}

compile_boost_python() {
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "opencamlib"
version = "2022.12.17"
version = "2022.12.18"
description = "open source computer aided manufacturing algorithms library"
readme = "README.rst"
authors = [
Expand Down
4 changes: 2 additions & 2 deletions src/npmpackage/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/npmpackage/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencamlib/opencamlib",
"version": "2022.12.17",
"version": "2022.12.18",
"description": "opencamlib for the web compiled with emscripten",
"main": "./lib/napi/index.js",
"browser": "./browser.js",
Expand Down

0 comments on commit 94f1f31

Please sign in to comment.