[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Current state of packaging Python software for Debian



Hi,

[Barry Warsaw]
> [Zygmunt Krynicki]
>> Can please we have standardized hooks to build sphinx documentation and run
>> setup.py test tests?
> I'd like to see the packaging folks address this.  Eric is subscribed to this
> list and can probably speak to packaging's take on it, but my preferences
> would be that
> 
> $ pysetup test
> 
> would run all the tests in Python 3.3 and beyond (and in a distutils2 world).
> I don't think this is supported (yet?), and my limited testing required some
> 2to3 hackery that isn't quite working.

Yes, last summer’s GSoC added a test command, which defaults to
unittest(2) test discovery and can be configured to use any test runner
on any test suite.  It runs tests against the modules in the build
directory, to be able to work with code converted at build time with
2to3 (and soon, to be able to access the PEP 376 dist-info files).
Barry, I’m waiting for reports about the problems you ran into :)

Note that our implementation of test and 2to3 conversion is quite
different from setuptools/distribute’s.  For one thing, we use regular
command options in the config file or on the command line, not global
setup() arguments (and now setup() is gone anyway).  I’m greatly
responsible for that, because I believe it’s much cleaner.

Regarding Sphinx, I don’t think it would be appropriate to add a command
for it in the stdlib.  We already have upload_docs, which can upload any
set of HTML files.  However, it’s much easier to add custom command in
packaging¹, so Sphinx’ distutils-based build² command can be used with
pysetup.

¹ http://docs.python.org/dev/packaging/setupcfg#global-options
² Why isn’t it named build_docs?!


[Ben Finney]
> AFAICT it *is* the de facto standard. Perhaps you mean that you want it
> to be the de jure standard? What change are you wanting on this?

In some sub-communities, py.test or nosetests are the standard, not
setup.py test.

Regards


Reply to: