Giter VIP home page Giter VIP logo

Comments (8)

kylebarron avatar kylebarron commented on June 8, 2024 1

Sure

from pydelatin.

kylebarron avatar kylebarron commented on June 8, 2024

😄 Thanks for taking a stab at conda-forge here again, and apologies for my trouble in correctly packaging! Packaging is hard!

I'm still learning best practices for wrapping lower-level code (especially since I don't know C/C++ that well). In this package I actually expose two libraries, the Pybind11 source is built from src/ and is exposed as _pydelatin; then I have a separate wrapper in pydelatin/ that's exposed as pydelatin. This helped since I couldn't really figure out how to pass 2D numpy arrays back from C++ directly.

Looking at the 0.2.0 source tarball, it looks like the src/ folder exists. So it seems like it should work for building from source locally?

Separately, this does rely on one other external library: glm. It should be easy to work with, since it's a header-only library. That said, I spent a couple hours last night trying to get windows wheels to work, and just couldn't figure out how to correctly modify the include paths 😂 . So maybe you'd need to put glm on conda? I don't know

from pydelatin.

davidbrochart avatar davidbrochart commented on June 8, 2024

So glm is on conda-forge: https://github.com/conda-forge/glm-feedstock
Maybe I was just missing that one. But anyway in conda-forge we shouldn't vendor another package, so I'm doing one for hmm.
Thanks for the information, I'll let you know how it goes!

from pydelatin.

kylebarron avatar kylebarron commented on June 8, 2024

Ok, it seems like I'd need to make changes to pydelatin to support an external hmm?

Like I'd probably need to change these includes

pydelatin/src/main.cpp

Lines 13 to 15 in c6f2a74

#include "base.h"
#include "heightmap.h"
#include "triangulator.h"

to

#include <hmm/base.h>
#include <hmm/heightmap.h>
#include <hmm/triangulator.h>

The main.cpp is the only C++ file I modified directly. Since I'm a total noob to good building practices, I might be wary of making changes unless it's clear how to also change the wheel building process. Like I know I should be able to fetch hmm and glm from github, and link against them in main.cpp without hardcoding anything, but I need to research how to do that

from pydelatin.

davidbrochart avatar davidbrochart commented on June 8, 2024

OK I'm done with hmm: conda-forge/staged-recipes#12915
Would you like to be a maintainer of the conda-forge package?

from pydelatin.

davidbrochart avatar davidbrochart commented on June 8, 2024

You know more than me about pip packaging, but what are the options to not vendor another library (here hmm and glm)? Can you download e.g. https://github.com/fogleman/hmm/archive/v1.1.0.tar.gz?
In any case, yes you will need to change to:

#include "hmm/base.h"
#include "hmm/heightmap.h"
#include "hmm/triangulator.h"

from pydelatin.

davidbrochart avatar davidbrochart commented on June 8, 2024

Maybe it's fine for now, we can see if we can improve that in the future.

from pydelatin.

davidbrochart avatar davidbrochart commented on June 8, 2024

We now have a conda-forge package: https://github.com/conda-forge/pydelatin-feedstock
To install it:

$ conda install pydelatin -c conda-forge

Thanks again for this great library!

from pydelatin.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.