Re: packaging problems with python3.5 and python 3.6

2017-07-29 Thread Steve Langasek
On Sun, Jul 30, 2017 at 03:16:06PM +0900, Norbert Preining wrote:
> Hi Steve,

> Thanks for your answer and your fix!

> > Which "python packaging guide" do you refer to?  A search for "debian python
> > packaging guide" does not return unambiguous results.

> https://wiki.debian.org/Python/LibraryStyleGuide where it states:
>   You'll want to have at least the following build dependencies: 
>   ...
>   python3-all
> but the
>   python[,3]-all-dev
> are never mentioned. So sorry, I didn't know about them and searched
> for the required header files, and added the respective packages.

> > 'python-all-dev, python3-all-dev' - plus the python2 and python3 versions of

> Thanks, maybe one with proper knowledge should fix the wiki, though.

Ok, that was the first hit I got but I discounted it because it spoke of
packaging "libraries", not modules or extensions.

Perhaps someone should make this wiki page a redirect to the python policy
manual?  https://www.debian.org/doc/packaging-manuals/python-policy/

> > Since this package is in collab-maint, I've gone ahead and pushed fixed
> > python3 support to the repo.

> Thanks again. You added a dependency on python-lxml. I don't think this
> is necessary as libxml is only used at compile time. At least building
> in a clean chroot did work out without any problems.

I added python3-lxml because without it, build-time tests failed for
python3.  If I also added python-lxml, that was purely a cut'n'paste error.

> BTW, does it make sense to upload another -1 version to ftp-master
> to replace the one in the NEW queue?

AFAIK you would need to get the ftpmasters to reject the existing -1 first.

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
Ubuntu Developerhttp://www.debian.org/
slanga...@ubuntu.com vor...@debian.org


signature.asc
Description: PGP signature


Re: packaging problems with python3.5 and python 3.6

2017-07-29 Thread Norbert Preining
Hi Steve,

Thanks for your answer and your fix!

> Which "python packaging guide" do you refer to?  A search for "debian python
> packaging guide" does not return unambiguous results.

https://wiki.debian.org/Python/LibraryStyleGuide where it states:
You'll want to have at least the following build dependencies: 
...
python3-all
but the
python[,3]-all-dev
are never mentioned. So sorry, I didn't know about them and searched
for the required header files, and added the respective packages.

> 'python-all-dev, python3-all-dev' - plus the python2 and python3 versions of

Thanks, maybe one with proper knowledge should fix the wiki, though.

> Since this package is in collab-maint, I've gone ahead and pushed fixed
> python3 support to the repo.

Thanks again. You added a dependency on python-lxml. I don't think this
is necessary as libxml is only used at compile time. At least building
in a clean chroot did work out without any problems.

BTW, does it make sense to upload another -1 version to ftp-master
to replace the one in the NEW queue?

All the best

Norbert

--
PREINING Norbert   http://www.preining.info
Accelia Inc. +JAIST +TeX Live +Debian Developer
GPG: 0x860CDC13   fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13



Re: packaging problems with python3.5 and python 3.6

2017-07-29 Thread Steve Langasek
On Sun, Jul 30, 2017 at 08:35:47AM +0900, Norbert Preining wrote:
> Dear all
> 
> (please Cc)
> 
> to satisfy a dependency of the next Calibre package I have packaged
>   html5-parser
>   https://github.com/kovidgoyal/html5-parser
> see 
> Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/html5-parser.git
> Vcs-Git: git://anonscm.debian.org/collab-maint/html5-parser.git

> Unfortunately I have given up providing python3 modules, since it seems
> that either python3.5 or python3.6 breaks when adding the respective 
> line as explained in the python packaging guide.

Which "python packaging guide" do you refer to?  A search for "debian python
packaging guide" does not return unambiguous results.

Your difficulties almost certainly stem from you having set wrong
build-dependencies.  The correct build-dependencies here are
'python-all-dev, python3-all-dev' - plus the python2 and python3 versions of
any other modules needed at build time.  You should, e.g., never be
build-depending on python2.7-dev without a very good reason, and if you
build-depend on libpython3.6-dev this will obviously not give you python3.5
support.

If there is a python packaging guide suggesting that these sort of build
dependencies are appropriate, we should certainly get that corrected.

Since this package is in collab-maint, I've gone ahead and pushed fixed
python3 support to the repo.

> For now I have uploaded the package with python2 support, only, as this also
> the only one needed for Calibre (which is python2 application).

> If you have any suggestion concerning the python3 packaging part, please
> let me know how this should be done.  You can see what I have done wrt
> python3 in the following commit
> https://anonscm.debian.org/cgit/collab-maint/html5-parser.git/commit/?id=4a8e02b20698e35e577482f96efdeb17826d797f
> which I reverted afterwards.

> Thanks a lot and all the best

Thanks,
-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
Ubuntu Developerhttp://www.debian.org/
slanga...@ubuntu.com vor...@debian.org


signature.asc
Description: PGP signature


packaging problems with python3.5 and python 3.6

2017-07-29 Thread Norbert Preining
Dear all

(please Cc)

to satisfy a dependency of the next Calibre package I have packaged
html5-parser
https://github.com/kovidgoyal/html5-parser
see 
Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/html5-parser.git
Vcs-Git: git://anonscm.debian.org/collab-maint/html5-parser.git

Unfortunately I have given up providing python3 modules, since it seems
that either python3.5 or python3.6 breaks when adding the respective 
line as explained in the python packaging guide.

For now I have uploaded the package with python2 support, only, as this also
the only one needed for Calibre (which is python2 application).

If you have any suggestion concerning the python3 packaging part, please
let me know how this should be done.  You can see what I have done wrt
python3 in the following commit
https://anonscm.debian.org/cgit/collab-maint/html5-parser.git/commit/?id=4a8e02b20698e35e577482f96efdeb17826d797f
which I reverted afterwards.

Thanks a lot and all the best

Norbert

--
PREINING Norbert   http://www.preining.info
Accelia Inc. +JAIST +TeX Live +Debian Developer
GPG: 0x860CDC13   fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13



Re: updating packages

2017-07-29 Thread Christopher Hoskin
> Only has a Python 3 version. Not sure if this matters.
>

As sphinx is used for documentation, even if you're building a python2
package, you can use the python3 sphinx. Build-depends on
python3-sphinx and Build-Conflicts on python-sphinx.

See e.g.

https://anonscm.debian.org/cgit/python-modules/packages/kombu.git?h=debian%2Fexperimental

I was going to look at updating vine, kombu and python-ampq this
weekend, but the upstream tarballs have been signed by a different key
pair than the one advertised at:

http://docs.celeryproject.org/en/latest/contributing.html#security

which makes me reluctant to proceed until the Celery Project confirms
that they're using a different key pair.

Christopher



Re: updating packages

2017-07-29 Thread Brian May
Christopher Hoskin  writes:

> sphinx_celery is already packaged as sphinx-celery:
>
> https://packages.qa.debian.org/s/sphinx-celery.html

Only has a Python 3 version. Not sure if this matters.

At the moment, when I try to build djangorestframework I get the
following error. Maybe jinja2 is too old or too new?

# Build the HTML documentation.
mkdir /<>/docs.debian
LC_ALL=C.UTF-8 PYTHONPATH=/usr/share/mkdocs/themes mkdocs build && mv site 
docs.debian/html
INFO-  Building documentation to directory: /<>/site 
Traceback (most recent call last):
  File "/usr/bin/mkdocs", line 9, in 
load_entry_point('mkdocs==0.15.3', 'console_scripts', 'mkdocs')()
  File "/usr/lib/python3/dist-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/mkdocs/__main__.py", line 137, in 
build_command
), clean_site_dir=clean)
  File "/usr/lib/python3/dist-packages/mkdocs/commands/build.py", line 290, in 
build
build_pages(config)
  File "/usr/lib/python3/dist-packages/mkdocs/commands/build.py", line 234, in 
build_pages
build_template('404.html', env, config, site_navigation)
  File "/usr/lib/python3/dist-packages/mkdocs/commands/build.py", line 149, in 
build_template
output_content = template.render(context)
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1008, in 
render
return self.environment.handle_exception(exc_info, True)
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 780, in 
handle_exception
reraise(exc_type, exc_value, tb)
  File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 37, in reraise
raise value.with_traceback(tb)
  File "/<>/docs_theme/404.html", line 1, in top-level template 
code
{% extends "main.html" %}
  File "/<>/docs_theme/main.html", line 7, in top-level template 
code
{% if page.title %}{{ page.title }} - {% endif %}{{ config.site_name 
}}
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 430, in 
getattr
return getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'page' is undefined
debian/rules:12: recipe for target 'override_dh_auto_build' failed
make[1]: *** [override_dh_auto_build] Error 1
make[1]: Leaving directory '/<>'
debian/rules:9: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

-- 
Brian May 



Re: updating packages

2017-07-29 Thread Christopher Hoskin
Dear Brian,

sphinx_celery is already packaged as sphinx-celery:

https://packages.qa.debian.org/s/sphinx-celery.html

Christopher

On 3 July 2017 at 23:23, Brian May  wrote:
> Hello,
>
> I have started updating packages, trying to fix Django 1.11 issues where
> applicable, but seem to be running into road blocks for everything I
> try. Have updated git. Help appreciated:
>
> * django-filter, requires djangorestframework.
> * djangorestframework, tests fail, not yet investigated in detail why.
> * celery: requires cyanide (including docs) and sphinx_celery to be packaged 
> in Debian.
>
> Thanks.
> --
> Brian May 
> https://linuxpenguins.xyz/brian/
>



Re: updating packages

2017-07-29 Thread Brian May
fladischermich...@fladi.at writes:

> I made some changes to the django-filter package in git. Could you check
> if it fixes your issues? Right now 1.0.4-1 builds fine for me with the
> current version of DRF in unstable.

Looks fine to me, uploaded.

Thanks
-- 
Brian May