Skip to content

Conversation

@jeffi
Copy link

@jeffi jeffi commented Mar 24, 2020

This should probably remain on a branch since it is incompatible with FCL 0.5.0 which still ships in many package managers.

@jf---
Copy link

jf--- commented Mar 24, 2020

There is a little error - the __init__.py was not updated in this commit.

Some of the classes in .fcl are updated and therefore missing now. Rather than explicitly writing the items in the imported modules, why not change it to:

from .fcl import *

from .collision_data import *

from .version import __version__

which still ships in many package managers

a conda package might make a lot of sense, especially since you don't rely on system installed packages, and it makes it a lot easier to build packages for all platforms ( when leveraging the conda-forge infrastructure ). Packages for FCL ( 0.6.1 Linux, osx ) and octomap ( Linux , osx , windows exist so it really is a walk in the park. See below, the build.sh & meta.yaml to build the conda package.

Using different conda envs is also very practical in say testing python-fcl v 0.50 vs 0.60

There are binaries for octomap & fcl, so should be pretty straightfwd. When a commit is merged to master its pretty easy to cook up CD action for conda packages to keep 'm in sync with master. I have a conda recipe which I'm happy to share. It might make sense to migrate then from travis -> github actions

This also addresses #17 since using the prebuild conda libs ( octomap, FCL should be extended to windows ) is a lot easier.


#!/bin/sh

export NP_INC=`python -c "import numpy; print(numpy.get_include())"`
echo "numpy include directory: " $NP_INC

python setup.py build_ext --include-dirs $PREFIX/include:$PREFIX/include/eigen3:$NP_INC --library-dirs $PREFIX/lib
python setup.py install

# TODO: cython has an issue loading .pyc compiled from another directory then where they are stored now...
# see:
find $RECIPE_DIR -name "*.pyc" -delete
package:
  name: python-fcl          # lower case name of package, may contain '-' but no spaces
  version: "0.6.0"    # version of package. Should use the PEP-386 verlib

source:
  git_url: https://github.com/jeffi/python-fcl.git
  git_rev: fcl-0.6.x

build:
#  # The build number should be incremented for new builds of the same version
  number: 1       # (defaults to 0)
  binary_relocation: true # (defaults to true)

requirements:
  build:
    - python
    - cython
    - numpy
    - fcl
    - octomap
    - eigen

#  # Packages required to run the package. These are the dependencies that
#  # will be installed automatically whenever the package is installed.
  run:
    - python
    - numpy
    - fcl
    - octomap
    - eigen

about:
  home: https://github.com/BerkeleyAutomation/python-fcl
  summary: This library is a Python binding of FCL library.
  license: BSD

@mikedh
Copy link
Collaborator

mikedh commented Feb 22, 2022

Thanks for the PR! Now that #29 is merged and released, I think we can close this?

@mjd3 mjd3 closed this Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants