Go Back   Flash Flash Revolution > General Discussion > Technology
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
Old 03-15-2014, 08:54 AM   #1
DossarLX ODI
Batch Manager
Game Manager, Song Release Coordinator
Game ManagerSimfile JudgeFFR Simfile AuthorD7 Elite KeysmasherFFR Veteran
 
DossarLX ODI's Avatar
 
Join Date: Mar 2008
Location: USA
Age: 29
Posts: 14,861
Default Setting up Cython

I've been trying to do this for 4 hours and it's pissing me off to no end. I'll describe what the issues are.

Cython is a Python package that allows python code to be compiled into C code so it can run faster.

To clarify, I am using Windows 7.

- I got Cython 0.20.1 (released 2014-02-11) from cython.org and unpacked it
- I ran setup.py through IDLE and it put a bunch of other stuff in my Cython-0.20.1 folder (separate from the Python27 folder)
- Added C:\python27;C:\MinGW\bin;C:\Cython-0.20.1 to PATH
- I put a hello world program in my Cython folder and ran those from import statements and got:
Code:
Python 2.7.6 (default, Nov 10 2013, 19:24:24) [MSC v.1500 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import os
>>> os.chdir( 'c:/Cython-0.20.1' )
>>> from distutils.core import setup
>>> from Cython.Build import cythonize
>>> setup(
    ext_modules = cythonize("helloworld.pyx")
)
Compiling helloworld.pyx because it changed.
Cythonizing helloworld.pyx
Then I get to this step.
Code:
python setup.py build_ext --inplace
I enter that into windows cmd and it does recognize python's interpreter because when I type python by itself it runs the interpreter in Python27. Then I get
Code:
> python setup.py build_ext --inplace
python: can't open file 'setup.py': [Errno 2] No such file or directory
So now I have a .pyx file and a .c file for helloworld, but I can't get a .dll like what the documentation says (Windows).

Edit: Even worse, I don't even think it's set up properly, yet I have the cythonize stuff in the package.

Code:
> python setup.py install
running install
running build
running build_py
running build_ext
building 'Cython.Plex.Scanners' extension
C:\cygwin\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\python27\include -IC:\pyth
on27\PC -c Cython\Plex\Scanners.c -o build\temp.win-amd64-2.7\Release\cython\ple
x\scanners.o
cygwin warning:
  MS-DOS style path detected: Cython\Plex\Scanners.c
  Preferred POSIX equivalent is: Cython/Plex/Scanners.c
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
gcc: error: unrecognized command line option `-mno-cygwin'
error: command 'gcc' failed with exit status 1


Edit 2: Now I'm getting gcc errors on ld
Code:
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
__________________
Quote:
Originally Posted by hi19hi19 View Post
oh boy, it's STIFF, I'll stretch before I sit down at the computer so not I'm not as STIFF next time I step a file

Last edited by DossarLX ODI; 03-15-2014 at 09:23 AM..
DossarLX ODI is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 06:26 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright FlashFlashRevolution