Re: [Cython] unsupported meta-programming-related features

2016-04-19 Thread Xuancong Wang
Sorry, I have a few extra steps which map all parser symbols into the global space. parser = argparse.ArgumentParser(...) parser.add_argument('-ht', '--headtail', help='add headtail', default=False, action='store_true') opt=parser.parse_args() globals().update(vars(opt)) xuancong On Wed, Apr 20,

Re: [Cython] unsupported meta-programming-related features

2016-04-19 Thread Stefan Behnel
Xuancong Wang schrieb am 19.04.2016 um 11:13: > Python supports meta-programming, in which a variable with name > specified in a string can be created at run-time. One built-in library > which make use of this is argparse. > > For example: > > parser.add_argument('-N', '--max_threads', help='maxi

Re: [Cython] unsupported meta-programming-related features

2016-04-19 Thread Robert Bradshaw
On Tue, Apr 19, 2016 at 2:13 AM, Xuancong Wang wrote: > Dear Cython developers, > > Python supports meta-programming, in which a variable with name > specified in a string can be created at run-time. One built-in library > which make use of this is argparse. > > For example: > > parser.add_argume

Re: [Cython] Cannot cythonize subclasses of setuptools.extension._Extension

2016-04-19 Thread Manuel Nuno Melo
This strayed a bit from the original topic, but yes, I should bring this up with setuptools project. Thanks for the feedback. (My feeling was that this was a somewhat stalled problem, reported in two issues and persisting after a couple of years: #209

[Cython] unsupported meta-programming-related features

2016-04-19 Thread Xuancong Wang
Dear Cython developers, Python supports meta-programming, in which a variable with name specified in a string can be created at run-time. One built-in library which make use of this is argparse. For example: parser.add_argument('-N', '--max_threads', help='maximum number of concurrent decoding t

Re: [Cython] Cannot cythonize subclasses of setuptools.extension._Extension

2016-04-19 Thread Erik Bray
On Mon, Apr 18, 2016 at 6:56 PM, Manuel Nuno Melo wrote: > Ah, sorry Erik, you're absolutely right. I mixed my results a bit and must > elaborate: > > 'setup_requires' on its own will indeed not generate the behavior I > described. > > However, if you define the same dependency under 'setup_requir