That is a pretty hacky hack, but if it gets your module compiled, then why
not! You probably could have just set environment variables CFLAGS
("-I/path/to/python/includes") and LDFLAGS ("-L/path/to/libraries").

Python eggs are just zip files. When you installed them in one particular
location, you should see ".pth" files in that same location. The ".pth"
files contain the reference to the eggs, which tells python to also append
them to your python path. So your option is to also copy or update the .pth
file in the new target location, or extract the egg using zip.

On Sat, Dec 2, 2017 at 7:02 AM Ruchit Bhatt <ruchitinnewfush...@gmail.com>
wrote:

> Using below code i am able to convert *.py to *.pyd. And script editor are
> also importing properly. Now tell me how to extract *.egg ? so that i can
> use cython without
> sys.path.append...Will do more test with PyQt/Pyside. I hope it will work
> fine.
> Thank you
>
> import sys
> sys.path.append("C:\Program
> Files\Autodesk\Maya2017\Python\Lib\site-packages\Cython-0.27.3-py2.7-win-amd64.egg"
> )
>
> import cython
> from distutils.core import setup
> from distutils.extension import Extension
> from Cython.Distutils import build_ext
>
> setup(
>     cmdclass = {'build_ext': build_ext},
>     ext_modules = [
>         Extension("randomNumber", ["randomNumber.pyx"]),
>         Extension("additionNumber", ["additionNumber.pyx"]),
>     ]
> )
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/e01ff811-0261-4925-8d6c-01594892067a%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/e01ff811-0261-4925-8d6c-01594892067a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA32Lhg3q828yFSZxHyek%3DW_f642B4V-3P0akF2UL7AkaA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to