Coder Social home page Coder Social logo

Comments (8)

a-hurst avatar a-hurst commented on June 8, 2024 1

Yeah I've looked at that in the past, but it's missing a lot of development libraries (including freetype, sadly). I was recently made aware of a C/C++ package manager called Conan which looks like it does support freetype, but it seems complicated to set up and looks like it still requires you to build everything from source.

from aggdraw.

a-hurst avatar a-hurst commented on June 8, 2024 1

Look like we might have a new contender here: Microsoft, of all places, has apparently come up with a cross-platform package manager called vcpkg that builds/installs the binaries and headers for lots of common libraries (including Freetype) with a single terminal command (e.g. vcpkg install freetype).

Apparently it's already pre-installed on all Appveyor images and supports both 32-bit and 64-bit Windows, so if it works, the only thing we'd need to do would be to copy its pre-built binary into the wheels somewhere and make sure that aggdraw can actually link to it. Over the holidays I'm going to try and figure out if vcpkg can help me get bundled .dlls for pysdl2 fully working, so if I'm successful I can hopefully apply what I've learned here, too.

from aggdraw.

a-hurst avatar a-hurst commented on June 8, 2024

Just wanted to mention that I might have a solution for including FreeType in the Windows wheels (which would solve this issue), though I won't have the time to test it out anytime soon: it looks like the freetype-py project has a build script for building FreeType on Windows that works with Appveyor, meaning that we could either adapt this code for aggdraw or alternatively just produce x86/x64 Windows FreeType DLLs using the script that we can then use for building aggdraw on Appveyor. We'd also need some code for bundling the .dll with the wheel (since there's no package to do this automatically like there is on macOS or Linux), but there are plenty of examples of other projects doing this that we could follow.

from aggdraw.

djhoese avatar djhoese commented on June 8, 2024

What about just depending on freetype-py?

Edit: And building against it when the wheels are generated, if needed.

from aggdraw.

a-hurst avatar a-hurst commented on June 8, 2024

That could work, but the built .dlls are buried within the wheels so building aggdraw wheels against it might be difficult. We could also just set up the appveyor CI to download and extract the .dll from the freetype-py wheel and then include that in the Windows wheels, which would likely be easier to implement while still keeping aggdraw dependency-free.

from aggdraw.

djhoese avatar djhoese commented on June 8, 2024

I'm not really familiar with linking when it comes to .dll's. If we can install freetype-py and point the AGGDRAW_FREETYPE_ROOT environment variable where its .dll is, then that's probably the best overall solution. Oh wait...that wouldn't provide the headers needed for building. Could we modify the setup.py to point at a system installed freetype for the headers and then point to the freetype-py .dll...no that's a terrible idea.

I'm not sure your suggestion would work either since we need the freetype headers.

from aggdraw.

a-hurst avatar a-hurst commented on June 8, 2024

Hmm, good point. Depending on how much it slows the builds, maybe integrating the build script is the best solution. Shame Windows doesn't have a package manager that would make getting the binaries/headers as easy as it is on Linux/macOS...

from aggdraw.

djhoese avatar djhoese commented on June 8, 2024

I think the astropy/ci-helpers project uses "Chocolatey"?

Edit: https://chocolatey.org/

from aggdraw.

Related Issues (20)

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.