Robert Bradshaw wrote: > On Oct 6, 2008, at 11:51 AM, Robert Kern wrote: > >> Robert Bradshaw wrote: >>> On Oct 6, 2008, at 10:38 AM, Dag Sverre Seljebotn wrote: >>> >>>>> Robert Kern wrote: >>>>> Oh, never mind. I see what you're saying. But then why do we need >>>>> cython.py if >>>>> everything is provided by Cython/__init__.py? >>>>> >>>> At least for me, Python cannot import it by the name "cython" if >>>> only >>>> Cython/... is available. And I think we want "import cython" (not >>>> "import >>>> Cython") to work, as lowercase is more consistent with common Python >>>> naming schemes in general and just "feels more right" for such core >>>> language functionality. >>>> >>>> (Also the module name would otherwise need to change in a lot of >>>> places -- >>>> when compiling under Cython, as opposed to running in Python, >>>> "cython" is >>>> a magic, hard-wired module and "Cython" will not work, at least >>>> currently >>>> (and my opinion is it never should)) >>> My thoughts exactly. I think the "cython compiler codebase" and the >>> "cython magic module" as completely separate concepts. The only >>> reason Cython/__init__.py does anything is to be a workaround for >>> case insensitive filesystems. >> In that case, I would recommend not using "cython" and pick another >> name that >> won't cause problems on such systems. > > But it doesn't cause a problem on such systems. Personally, I can't > think of any name that would be more appropriate than "cython."
I guess it will probably not cause many problems. It's just a code smell that I would avoid. You're repeating code. And making cython.py do double-duty as both a module in site-packages and a script in /usr/local/bin adds to the code smell. Oh, and don't forget to add cython.py to py_modules=, otherwise I don't think it will get installed correctly. While I'm looking at the setup.py script, why are the modules in pyximport being listed separately in py_modules= instead of being listed as a package in packages=? -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
