Closed davelab6 closed 6 years ago
In general, usepip install .
to install from a local source checkout. setup.py install is deprecated (uses the old easy_install command from setuptools and creates an egg, wheres pip creates a wheel).
If it still fails upgrade pip and try again. Recent pip will bootstrap the build requirements including cython itself.
If you can’t or don’t want to upgrade pip you can install cython separately before running install
Also
pip install skia-pathops
Should be enough as install instructions. You should get a precompiled wheel as released from pypi (which does not require cython or a C compiler). If you don’t get the wheel and it attempts instead to compile from source, it means you are using a python version or platform which I didn’t build wheels for (which one is that?).
For anything more than pip install skia-pathops, I would simply link to the python packaging user guide for more advanced options
I can always have the CI build more wheels of course
$ pip3 install .
Processing /Users/dcrossland/src/github.com/fonttools/skia-pathops
Could not find a version that satisfies the requirement mingwpy>=0.1.0b3 (from versions: )
No matching distribution found for mingwpy>=0.1.0b3
$
pip3 install skia-pathops
worked tho
As i said, if you upgrade pip to latest version (18) then it will work for source checkout too
Still not quite working:
$ pip3 install --upgrade pip
Requirement already up-to-date: pip in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (18.0)
$ pip3 install -e .
Obtaining file:///Users/dcrossland/src/github.com/fonttools/skia-pathops
Installing build dependencies ... done
Installing collected packages: skia-pathops
Found existing installation: skia-pathops 0.2.0.post2
Uninstalling skia-pathops-0.2.0.post2:
Successfully uninstalled skia-pathops-0.2.0.post2
Running setup.py develop for skia-pathops
Complete output from command /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -c "import setuptools, tokenize;__file__='/Users/dcrossland/src/github.com/fonttools/skia-pathops/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" develop --no-deps:
running develop
running egg_info
writing src/python/skia_pathops.egg-info/PKG-INFO
writing dependency_links to src/python/skia_pathops.egg-info/dependency_links.txt
writing requirements to src/python/skia_pathops.egg-info/requires.txt
writing top-level names to src/python/skia_pathops.egg-info/top_level.txt
src/python/pathops/_pathops.pyx: cannot find cimported module '._skia.pathops'
src/python/pathops/_pathops.pyx: cannot find cimported module '._skia.core'
src/python/pathops/_pathops.pxd: cannot find cimported module '._skia.pathops'
src/python/pathops/_pathops.pxd: cannot find cimported module '._skia.core'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'src/cpp/skia/README'
warning: no files found matching 'src/cpp/skia/LICENSE'
warning: no files found matching '*.cpp' under directory 'src/cpp/skia/src'
warning: no files found matching '*.h' under directory 'src/cpp/skia/src'
warning: no files found matching '*.h' under directory 'src/cpp/skia/include'
writing manifest file 'src/python/skia_pathops.egg-info/SOURCES.txt'
running build_ext
running build_clib
error: file '/Users/dcrossland/src/github.com/fonttools/skia-pathops/src/cpp/skia/src/core/SkArenaAlloc.cpp' does not exist
----------------------------------------
Rolling back uninstall of skia-pathops
Command "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -c "import setuptools, tokenize;__file__='/Users/dcrossland/src/github.com/fonttools/skia-pathops/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" develop --no-deps" failed with error code 1 in /Users/dcrossland/src/github.com/fonttools/skia-pathops/
Great, that's a :bug: I'll fix it, thanks!
oh... no it's not a bug. You have to either
git clone --recursive https://github.com/fonttools/skia-pathops
Or alternatively, if you have cloned normally without --recursive, you can
git submodule update --init --recursive
Skia library is embedded as a git submodule in the fonttools/skia-pathops repository.
etc :)