Re: [Distutils] combined c/c++ extension

2012-12-31 Thread Arfrever Frehtes Taifersar Arahesis
2012-12-30 11:40:53 Václav Šmilauer napisał(a):
 I am compiling an extension consisting of a number of files; some of 
 them are c++11, some are plain C. The compiler (gcc) detects language by 
 extension, not whether the g++/gcc binary is called. I am passing 
 -std=c++11 to the compiler because of c++ files. *.c files are 
 correctly treated as plain C by the compiler and it says:
 
 cc1.exe: warning: command-line option '-std=c++11' is valid for 
 C++/ObjC++ but not for C [enabled by default]
 
 I don't mind seeing that warning, but I would be concerned should it 
 become an error at some point in the future.
 
 As far as I see, the current design supposes the whole extension is a 
 single language, and single set of compiler flags. Is there a way around it?

See my patches for distutils:
http://bugs.python.org/issue1222585
Use -std=c++11 only in variables specific to C++ (e.g. CXXFLAGS).

-- 
Arfrever Frehtes Taifersar Arahesis


signature.asc
Description: This is a digitally signed message part.
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Odd problem with distribute 0.6.26 and 2to3

2012-05-18 Thread Arfrever Frehtes Taifersar Arahesis
2012-05-18 17:24:59 Vinay Sajip napisał(a):
 I'm having an odd problem with distribute and 2to3 when working with the venv 
 branch of Python 3.3 (PEP 405 - http://bugs.python.org/issue14712), and I'm 
 hoping one of the Fellowship of the Packaging can help.
 
 The problem: I created a venv with no Distribute installed. Then I downloaded 
 and extracted distribute-0.6.26.tar.gz in a scratch folder, and ran setup.py 
 install using the venv's python. This gave errors because some of the 
 setuptools 
 sources still have 2.x syntax, despite having been processed by 2to3.
 
 To investigate further, I added logging to distutils refactoring code to 
 print 
 what was being refactored. I won't list the entire log output [1], but when 
 looking at just one file which caused a SyntaxError - 
 setuptools/tests/test_packageindex.py - I see the following output from the 
 setup.py install operation:
 
 creating build
 creating build/src
 ...
 copying setuptools/tests/test_packageindex.py - build/src/setuptools/tests
 ...
 copying launcher.c - build/src
 Skipping implicit fixer: buffer
 Skipping implicit fixer: idioms
 Skipping implicit fixer: set_literal
 Skipping implicit fixer: ws_comma
 refactored build/src/setuptools/script template (dev).py
 ...
 refactored build/src/setuptools/tests/test_packageindex.py
 ...
 refactored build/src/release.py
 Before install bootstrap.
 Scanning installed packages
 No setuptools distribution found
 running install
 running build
 running build_py
 creating build/lib
 ...
 copying setuptools/tests/test_packageindex.py - build/lib/setuptools/tests
 ...
 creating /tmp/venv/lib/python3.3/site-packages/setuptools/tests
 copying build/lib/setuptools/tests/test_packageindex.py - 
 /tmp/venv/lib/python3.3/site-packages/setuptools/tests
 ...
 running install_lib
 ...
 creating /tmp/venv/lib/python3.3/site-packages/setuptools
 creating /tmp/venv/lib/python3.3/site-packages/setuptools/tests
 copying build/lib/setuptools/tests/test_packageindex.py - 
 /tmp/venv/lib/python3.3/site-packages/setuptools/tests
 ...
 byte-compiling /tmp/venv/lib/python3.3/site-
 packages/setuptools/tests/test_packageindex.py to test_packageindex.cpython-
 33.pyc
 ...
 running install_egg_info
 Writing /tmp/venv/lib/python3.3/site-packages/distribute-0.6.26-py3.3.egg-info
 setup.py:139: ResourceWarning: unclosed file _io.TextIOWrapper 
 name='README.txt' mode='r' encoding='UTF-8'
   long_description = open('README.txt').read() + open('CHANGES.txt').read(),
 setup.py:139: ResourceWarning: unclosed file _io.TextIOWrapper 
 name='CHANGES.txt' mode='r' encoding='UTF-8'
   long_description = open('README.txt').read() + open('CHANGES.txt').read(),
 /home/vinay/projects/python/sandbox/Lib/distutils/dist.py:257: UserWarning: 
 Unknown distribution option: 'test_suite'
   warnings.warn(msg)
 /home/vinay/projects/python/sandbox/Lib/distutils/dist.py:257: UserWarning: 
 Unknown distribution option: 'entry_points'
   warnings.warn(msg)
 /home/vinay/projects/python/sandbox/Lib/distutils/dist.py:257: UserWarning: 
 Unknown distribution option: 'zip_safe'
   warnings.warn(msg)
   File /tmp/venv/lib/python3.3/site-
 packages/setuptools/tests/test_packageindex.py, line 17
 except Exception, v:
 ^
 SyntaxError: invalid syntax
 
 Now the first part seems straightfoward: files are copied to build/src and 
 then 
 2to3 is run over them. But then, following the No setuptools distribution 
 found, files are copied to build/lib not from the 2to3-processed output at 
 build/src, but rather the actual 2.x sources shipped with distribute. That 
 looks 
 wrong; at the point where setup is called, src_root is correctly set to 
 build/src, and moreover, that's the first entry on sys.path. I'm not sure why 
 there's no error immediately following the byte-compiling ... line when 
 running install_lib, but the error seems to occur a little later, when 
 running 
 install_egg_info ...  
 
 Can anyone shed any light on what's happening here?

Try with Distribute 0.6.27, which fixes support for current snapshots of 
CPython 3.3.

-- 
Arfrever Frehtes Taifersar Arahesis


signature.asc
Description: This is a digitally signed message part.
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Buildout for Python 3, zc.buildout 2.0.0a1 released

2011-04-30 Thread Arfrever Frehtes Taifersar Arahesis
2011-04-30 15:15:54 Jim Fulton napisał(a):
 This release is for existing buildout users who want to use buildout
 with Python 3.  The main goal for this release is to facilitate
 porting projects that use buildout to Python 3.
 
 For more information, see:
 
   http://pypi.python.org/pypi/zc.buildout/2.0.0a1

Source tarballs are missing for zc.buildout-2.0.0a1 and zc.recipe.egg-2.0.0a1.

-- 
Arfrever Frehtes Taifersar Arahesis


signature.asc
Description: This is a digitally signed message part.
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Buildout not working with Bash wrapper for `python'

2010-06-18 Thread Arfrever Frehtes Taifersar Arahesis
2010-06-18 18:38:42 Marius Gedminas napisał(a):
 Linux requires that the interpreter be a real executable and won't accept a 
 script there.

Linux supports interpreters being scrips since 2.6.28.
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=bf2a9a39639b8b51377905397a5005f444e9a892

-- 
Arfrever Frehtes Taifersar Arahesis


signature.asc
Description: This is a digitally signed message part.
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Packaging Distribute

2009-10-09 Thread Arfrever Frehtes Taifersar Arahesis
2009-10-09 00:27:41 Tarek Ziadé napisał(a):
 On Fri, Oct 9, 2009 at 12:03 AM, Toshio Kuratomi a.bad...@gmail.com wrote:
  On Thu, Oct 08, 2009 at 11:07:13PM +0200, Arfrever Frehtes Taifersar 
  Arahesis wrote:
  2009-10-04 23:52:25 Sridhar Ratnakumar napisał(a):
   On Sun, 04 Oct 2009 13:41:06 -0700, Tarek Ziadé ziade.ta...@gmail.com
   wrote:
  
The other way would be to use Distribute instead of Setuptools for
what the packaging system is calling setuptools. That's pretty
much what is happening in Gentoo (arch) and UHU-Linux (dev),
right now
  
   Interesting. Gentoo uses distribute but retains the name 'setuptools'?
 
  It's because Distribute 0.6.* installs setuptools.* modules.
  Distribute 0.7.* will be under name dev-python/distribute.
 
  I started thinking about what it might take to do this for Fedora as well.
  There's a number of worries I have but it sounds attractive because of the
  increased maintainence support from distribute's upstream.
 
  An alternative I thought of would be for us to ship both distribute-0.6 and
  distribute-0.7 (when it arrives) and parallel install them.  Then we can
  patch the setuptools using packages we maintain to check first for the 0.6
  distribute and fall back on setuptools if it's not found.  That would
  hopefully get a bunch of upstreams onto a better supported code base.
 
  My question is: will Distribute have a parallel installation plan?  For
  instance, renaming the module provided by 0.7 distribute2?  If so, this
  makes a lot of sense.  If not, it's the ability of gentoo to reuse the
  setuptools name that makes parallel installation of distribute-0.6 and
  distribute-0.7 easier.
 
 We are not sure yet, but when 0.7 will be ready we have two choices:
 
 1- we ship 0.7 under a new name - e.g. like distribute2
 2- we ship a fat 0.7 with the old 0.6 packages and modules included.

I suggest to ship 0.7 under name distribute and allow parallel installation
of 0.6 and 0.7. E.g. Python 2.5 and 2.6 can be installed parallelly.

-- 
Arfrever Frehtes Taifersar Arahesis


signature.asc
Description: This is a digitally signed message part.
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Packaging Distribute

2009-10-08 Thread Arfrever Frehtes Taifersar Arahesis
2009-10-04 23:52:25 Sridhar Ratnakumar napisał(a):
 On Sun, 04 Oct 2009 13:41:06 -0700, Tarek Ziadé ziade.ta...@gmail.com  
 wrote:
 
  The other way would be to use Distribute instead of Setuptools for
  what the packaging system is calling setuptools. That's pretty
  much what is happening in Gentoo (arch) and UHU-Linux (dev),
  right now
 
 Interesting. Gentoo uses distribute but retains the name 'setuptools'?

It's because Distribute 0.6.* installs setuptools.* modules.
Distribute 0.7.* will be under name dev-python/distribute.

 Ah. But what if PJE releases setuptools with the *same* version number  
 0.6.3? What would the gentoo folks do in order to get the new setuptools  
 release in their packaging system? Or did they make a decision of totally  
 dropping setuptools from their repository?

We could switch to back to Setuptools only if Setuptools became more
maintained than Distribute.

-- 
Arfrever Frehtes Taifersar Arahesis


signature.asc
Description: This is a digitally signed message part.
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig