Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #11380 > unrolled thread

Packaging python-xrayutilities

Started byMARIE Alexandre <alexandre.marie@synchrotron-soleil.fr>
First post2019-03-18 10:40 +0100
Last post2019-03-21 12:50 +0100
Articles 15 — 6 participants

Back to article view | Back to linux.debian.maint.python


Contents

  Packaging python-xrayutilities MARIE Alexandre <alexandre.marie@synchrotron-soleil.fr> - 2019-03-18 10:40 +0100
    Re: Packaging python-xrayutilities Florian Pelgrim <fp@craneworks.de> - 2019-03-18 11:10 +0100
      RE:Packaging python-xrayutilities MARIE Alexandre <alexandre.marie@synchrotron-soleil.fr> - 2019-03-18 16:30 +0100
        Re: Packaging python-xrayutilities Andrey Rahmatullin <wrar@debian.org> - 2019-03-18 16:30 +0100
          RE:Packaging python-xrayutilities MARIE Alexandre <alexandre.marie@synchrotron-soleil.fr> - 2019-03-18 16:50 +0100
            RE:Packaging python-xrayutilities MARIE Alexandre <alexandre.marie@synchrotron-soleil.fr> - 2019-03-19 14:10 +0100
              RE:Packaging python-xrayutilities MARIE Alexandre <alexandre.marie@synchrotron-soleil.fr> - 2019-03-21 11:10 +0100
                Re: Packaging python-xrayutilities Andrey Rahmatullin <wrar@debian.org> - 2019-03-21 11:30 +0100
                  Re: Packaging python-xrayutilities Andreas Tille <andreas@an3as.eu> - 2019-03-21 11:50 +0100
                    RE:Packaging python-xrayutilities MARIE Alexandre <alexandre.marie@synchrotron-soleil.fr> - 2019-03-21 12:00 +0100
                  RE:Packaging python-xrayutilities MARIE Alexandre <alexandre.marie@synchrotron-soleil.fr> - 2019-03-21 11:50 +0100
                    Re: Packaging python-xrayutilities Alex Mestiashvili <amestia@rsh2.donotuse.de> - 2019-03-21 12:10 +0100
                      RE:Packaging python-xrayutilities MARIE Alexandre <alexandre.marie@synchrotron-soleil.fr> - 2019-03-21 12:20 +0100
                Re: Packaging python-xrayutilities Dmitry Shachnev <mitya57@debian.org> - 2019-03-21 12:40 +0100
                  Re: Packaging python-xrayutilities Dmitry Shachnev <mitya57@debian.org> - 2019-03-21 12:50 +0100

#11380 — Packaging python-xrayutilities

FromMARIE Alexandre <alexandre.marie@synchrotron-soleil.fr>
Date2019-03-18 10:40 +0100
SubjectPackaging python-xrayutilities
Message-ID<xCWUp-8b8-15@gated-at.bofh.it>
Hello,

I'm sorry if this is in the wrong place.
I've already asked for help but I had not explained well how I was encountering my problem and couldn't answer before today.
So here it is, i'm trying to update the debian package of python-xrayutilities.

The problem is when I run:    ```gbp import-orig --uscan --pristine-tar```

I get this error :
__________________________________________________________________________________________________________________________________________________________
uscan warn: In directory ., downloading
  https://qa.debian.org/watch/sf.php/xrayutilities/xrayutilities-testdata-20171020.tar.gz failed: 500 SSL upgrade failed: SSL wants a read first
uscan warn: No upstream tarball downloaded. No further processing with mk_origtargz ...
gbp:error: Uscan failed: In directory ., downloading
  https://qa.debian.org/watch/sf.php/xrayutilities/xrayutilities-testdata-20171020.tar.gz failed: 500 SSL upgrade failed: SSL wants a read first</warnings>
<warnings>No upstream tarball downloaded. No further processing with mk_origtargz ...
__________________________________________________________________________________________________________________________________________________________

So what I've done is update d/watch from :

```version=3 opts=uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha)\d*)$/$1~$2/ \ http://sf.net/xrayutilities/xrayutilities-(.+)\.tar\.gz```

to : 

```version=4
opts="uversionmangle=s/-pre/~pre/, \
      filenamemangle=s%(?:.*)xrayutilities-(.+)\.tar\.gz/download%\
                      xrayutilities-$1.tar.gz%" \
      http://sourceforge.net/projects/xrayutilities/files/v([\d\.]+)/ \
      (?:.*)xrayutilities-([\d\.]+)\.tar\.gz/download debian uupdate
```

that I got in the uscan man.

Thus I can run again : ```gbp import-orig --uscan --pristine-tar```

And then the command is able to find the right version.

The fact is when I choose the latest version to update debian's one, I get this error :
___________________________________________________________________________________________________________
What is the upstream version? [1.5.1] 1.5.1
gbp:info: Importing '../python-xrayutilities_1.5.1.orig.tar.gz' to branch 'upstream'...
gbp:info: Source package is python-xrayutilities
gbp:info: Upstream version is 1.5.1
Branch pristine-tar set up to track remote branch pristine-tar from origin.
gbp:info: Merging to 'master'
gbp:error: Automatic merge failed.
gbp:error: Error detected, Will roll back changes.
gbp:info: Rolling back branch upstream by resetting it to 5ce1c0bf0d95a9ffd7321a5065041596f05a8fe0
gbp:info: Rolling back branch pristine-tar by deleting it
gbp:info: Rolling back tag upstream/1.5.1 by deleting it
gbp:info: Rolling back branch master by resetting it to 121347cb1309a8ce3821ed3efdd3646442e59ca3
gbp:info: Rolling back failed merge of upstream/1.5.1
gbp:error: Rolled back changes after import error.
___________________________________________________________________________________________________________

Here is where I am stuck and where I am asking for some help please !

Thanks in advance for a response.

Cheers,

Alexandre Marie

[toc] | [next] | [standalone]


#11381

FromFlorian Pelgrim <fp@craneworks.de>
Date2019-03-18 11:10 +0100
Message-ID<xCXns-9M-21@gated-at.bofh.it>
In reply to#11380
Hi there,

I'm not really deep into packaging but it sounds like the build process 
is looking for https links on the uscan target.

Try to replace all http links to https in your package.

Cheers
Flo

Am 18.03.19 um 10:36 schrieb MARIE Alexandre:
> Hello,
> 
> I'm sorry if this is in the wrong place.
> I've already asked for help but I had not explained well how I was encountering my problem and couldn't answer before today.
> So here it is, i'm trying to update the debian package of python-xrayutilities.
> 
> The problem is when I run:    ```gbp import-orig --uscan --pristine-tar```
> 
> I get this error :
> __________________________________________________________________________________________________________________________________________________________
> uscan warn: In directory ., downloading
>    https://qa.debian.org/watch/sf.php/xrayutilities/xrayutilities-testdata-20171020.tar.gz failed: 500 SSL upgrade failed: SSL wants a read first
> uscan warn: No upstream tarball downloaded. No further processing with mk_origtargz ...
> gbp:error: Uscan failed: In directory ., downloading
>    https://qa.debian.org/watch/sf.php/xrayutilities/xrayutilities-testdata-20171020.tar.gz failed: 500 SSL upgrade failed: SSL wants a read first</warnings>
> <warnings>No upstream tarball downloaded. No further processing with mk_origtargz ...
> __________________________________________________________________________________________________________________________________________________________
> 
> So what I've done is update d/watch from :
> 
> ```version=3 opts=uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha)\d*)$/$1~$2/ \ http://sf.net/xrayutilities/xrayutilities-(.+)\.tar\.gz```
> 
> to :
> 
> ```version=4
> opts="uversionmangle=s/-pre/~pre/, \
>        filenamemangle=s%(?:.*)xrayutilities-(.+)\.tar\.gz/download%\
>                        xrayutilities-$1.tar.gz%" \
>        http://sourceforge.net/projects/xrayutilities/files/v([\d\.]+)/ \
>        (?:.*)xrayutilities-([\d\.]+)\.tar\.gz/download debian uupdate
> ```
> 
> that I got in the uscan man.
> 
> Thus I can run again : ```gbp import-orig --uscan --pristine-tar```
> 
> And then the command is able to find the right version.
> 
> The fact is when I choose the latest version to update debian's one, I get this error :
> ___________________________________________________________________________________________________________
> What is the upstream version? [1.5.1] 1.5.1
> gbp:info: Importing '../python-xrayutilities_1.5.1.orig.tar.gz' to branch 'upstream'...
> gbp:info: Source package is python-xrayutilities
> gbp:info: Upstream version is 1.5.1
> Branch pristine-tar set up to track remote branch pristine-tar from origin.
> gbp:info: Merging to 'master'
> gbp:error: Automatic merge failed.
> gbp:error: Error detected, Will roll back changes.
> gbp:info: Rolling back branch upstream by resetting it to 5ce1c0bf0d95a9ffd7321a5065041596f05a8fe0
> gbp:info: Rolling back branch pristine-tar by deleting it
> gbp:info: Rolling back tag upstream/1.5.1 by deleting it
> gbp:info: Rolling back branch master by resetting it to 121347cb1309a8ce3821ed3efdd3646442e59ca3
> gbp:info: Rolling back failed merge of upstream/1.5.1
> gbp:error: Rolled back changes after import error.
> ___________________________________________________________________________________________________________
> 
> Here is where I am stuck and where I am asking for some help please !
> 
> Thanks in advance for a response.
> 
> Cheers,
> 
> Alexandre Marie
> 

[toc] | [prev] | [next] | [standalone]


#11382

FromMARIE Alexandre <alexandre.marie@synchrotron-soleil.fr>
Date2019-03-18 16:30 +0100
Message-ID<xD2n7-39O-9@gated-at.bofh.it>
In reply to#11381
Thanks again for the response !

I am resending an answer as the first one was sent to Florian Pelgrim only.

> Try to replace all http links to https in your package.
Changing http to https didn't solve the issue.

I still get this error :
__________________________________________________________________________________________________________________________________________________________
What is the upstream version? [1.5.1] 
gbp:info: Importing '../python-xrayutilities_1.5.1.orig.tar.gz' to branch 'upstream'...
gbp:info: Source package is python-xrayutilities
gbp:info: Upstream version is 1.5.1
Branch pristine-tar set up to track remote branch pristine-tar from origin.
gbp:info: Merging to 'master'
gbp:error: Automatic merge failed.
gbp:error: Error detected, Will roll back changes.
gbp:info: Rolling back branch upstream by resetting it to a6a78543327c683bda62802445a37132d18af730
gbp:info: Rolling back branch pristine-tar by deleting it
gbp:info: Rolling back tag upstream/1.5.1 by deleting it
gbp:info: Rolling back branch master by resetting it to c64c56e88836df1e54a8cd1926dfd621c3161254
gbp:info: Rolling back failed merge of upstream/1.5.1
gbp:error: Rolled back changes after import error.
__________________________________________________________________________________________________________________________________________________________

Thanks for your time.

Cheers, 

Alex

[toc] | [prev] | [next] | [standalone]


#11383

FromAndrey Rahmatullin <wrar@debian.org>
Date2019-03-18 16:30 +0100
Message-ID<xD2n7-39O-7@gated-at.bofh.it>
In reply to#11382

[Multipart message — attachments visible in raw view] — view raw

On Mon, Mar 18, 2019 at 03:20:24PM +0000, MARIE Alexandre wrote:
> gbp:error: Automatic merge failed.
You need to find why there are conflicts and fix them. Good first steps
are running gbp with --no-rollback and/or finding what upstream files are
modified in the master branch in the current state.

-- 
WBR, wRAR

[toc] | [prev] | [next] | [standalone]


#11384

FromMARIE Alexandre <alexandre.marie@synchrotron-soleil.fr>
Date2019-03-18 16:50 +0100
Message-ID<xD2Gt-3gl-1@gated-at.bofh.it>
In reply to#11383
>  You need to find why there are conflicts and fix them. Good first steps
>  are running gbp with --no-rollback and/or finding what upstream files are
>  modified in the master branch in the current state.

When I do so, I only have one conflict on the file .gitignore.
I solved it and tried to commit all the staged changes in git gui, I get this message :

```commit-tree failed: fatal: 5d93...... is not a valid 'commit object'```

This error prevents me from doing anything more.

Thanks in advance for response.

Cheers,

Alex

[toc] | [prev] | [next] | [standalone]


#11385

FromMARIE Alexandre <alexandre.marie@synchrotron-soleil.fr>
Date2019-03-19 14:10 +0100
Message-ID<xDmFb-7NM-19@gated-at.bofh.it>
In reply to#11384
Hello,

I resolved my git issue, but when I build the package doc with sphinx-build :

```
make[1]: Entering directory '/<<PKGBUILDDIR>>'
pybuild --build -s custom -p 3.7 --build-args="env PYTHONPATH={build_dir} sphinx-build -bhtml doc/source build/sphinx/html"
I: pybuild base:217: env PYTHONPATH=/<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_xrayutilities/build sphinx-build -bhtml doc/source build/sphinx/html
```

I get this error :

```
/<<PKGBUILDDIR>>/doc/source/examples.rst:7: WARNING: Duplicate explicit target name: "here".
WARNING: autodoc: failed to import module 'xrayutilities'; the following exception was raised:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/sphinx/ext/autodoc/importer.py", line 154, in import_module
    __import__(modname)
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_xrayutilities/build/xrayutilities/__init__.py", line 74, in <module>
    __version__ = pkg_resources.get_distribution("xrayutilities").version
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 481, in get_distribution
    dist = get_provider(dist)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 357, in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'xrayutilities' distribution was not found and is required by the application
```

Does someone know how to deal with this kind of issue ?

Thanks in advance. Cheers,

Alex

[toc] | [prev] | [next] | [standalone]


#11391

FromMARIE Alexandre <alexandre.marie@synchrotron-soleil.fr>
Date2019-03-21 11:10 +0100
Message-ID<xE2O5-Ly-7@gated-at.bofh.it>
In reply to#11385
Hello,

I'm still working on the package python-xrayutilities for debian.

I've come to a point where the package can be built but when generating the doc,
lintian comes with a bunch of privacy-generic-breach tags like this :
____________________________________________________________________________________________________________________________________________________________________
W: python-xrayutilities-doc: privacy-breach-generic usr/share/doc/python-xrayutilities/html/_modules/index.html [<script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=tex-ams-mml_htmlormml">] (https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=tex-ams-mml_htmlormml)
____________________________________________________________________________________________________________________________________________________________________


I have tried to add in debian/rules this :
___________________________________________________________________________________________________________________________
override_dh_installdocs:
        ln -s /usr/share/javascript/mathjax/MathJax.js $(CURDIR)/doc/build/html/_static/MathJax.js
	find doc/build/html -name "*.html" -exec sed -i "s|https://cdn.mathjax.org/mathjax/latest/MathJax.js|_static/MathJax.js|" {} \;
   	dh_installdocs -ppython-xrayutilities-doc doc/build/html
___________________________________________________________________________________________________________________________


But it does not seem to work.

Cheers,

Alex

[toc] | [prev] | [next] | [standalone]


#11392

FromAndrey Rahmatullin <wrar@debian.org>
Date2019-03-21 11:30 +0100
Message-ID<xE37s-S9-9@gated-at.bofh.it>
In reply to#11391

[Multipart message — attachments visible in raw view] — view raw

On Thu, Mar 21, 2019 at 10:09:22AM +0000, MARIE Alexandre wrote:
> override_dh_installdocs:
>         ln -s /usr/share/javascript/mathjax/MathJax.js $(CURDIR)/doc/build/html/_static/MathJax.js
> 	find doc/build/html -name "*.html" -exec sed -i "s|https://cdn.mathjax.org/mathjax/latest/MathJax.js|_static/MathJax.js|" {} \;
>    	dh_installdocs -ppython-xrayutilities-doc doc/build/html
Is there really the leading tab only on the second line?

> But it does not seem to work.
What exactly doesn't seem to work?

-- 
WBR, wRAR

[toc] | [prev] | [next] | [standalone]


#11393

FromAndreas Tille <andreas@an3as.eu>
Date2019-03-21 11:50 +0100
Message-ID<xE3qO-YJ-9@gated-at.bofh.it>
In reply to#11392
On Thu, Mar 21, 2019 at 03:23:52PM +0500, Andrey Rahmatullin wrote:
> On Thu, Mar 21, 2019 at 10:09:22AM +0000, MARIE Alexandre wrote:
> > override_dh_installdocs:
> >         ln -s /usr/share/javascript/mathjax/MathJax.js $(CURDIR)/doc/build/html/_static/MathJax.js
> > 	find doc/build/html -name "*.html" -exec sed -i "s|https://cdn.mathjax.org/mathjax/latest/MathJax.js|_static/MathJax.js|" {} \;
> >    	dh_installdocs -ppython-xrayutilities-doc doc/build/html
> Is there really the leading tab only on the second line?
> 
> > But it does not seem to work.
> What exactly doesn't seem to work?

Wild guessing: The files to be changed might reside in debian/tmp - thus


    find debian ...

could be the solution.

Kind regards

     Andreas.

-- 
http://fam-tille.de

[toc] | [prev] | [next] | [standalone]


#11395

FromMARIE Alexandre <alexandre.marie@synchrotron-soleil.fr>
Date2019-03-21 12:00 +0100
Message-ID<xE3Au-11W-5@gated-at.bofh.it>
In reply to#11393
> Wild guessing: The files to be changed might reside in debian/tmp - thus
>
> 
>     find debian ...
> 
> could be the solution.

I am trying to do so, thanks for your response.

Cheers,

Alex

[toc] | [prev] | [next] | [standalone]


#11394

FromMARIE Alexandre <alexandre.marie@synchrotron-soleil.fr>
Date2019-03-21 11:50 +0100
Message-ID<xE3qO-YJ-5@gated-at.bofh.it>
In reply to#11392
> Is there really the leading tab only on the second line?

In fact I am trying to figure out where should I install the doc, and how could I avoid the lintian tag : privacy-breach-generic.

> What exactly doesn't seem to work?

The code I paste before wasn't working because the path was not good, I should have cleaned that before, sorry.

First I have this overrided to use the right method : 
_____________________________________________________________
override_dh_installdocs-indep:
	PYTONPATH=$(CURDIR)/debian python3 setup.py build_doc
	dh_installdocs
_____________________________________________________________

Then I want to deal with mathjax causing the privacy-breach-generic.
But I really don't know how to do that.

Cheers,

Alex

[toc] | [prev] | [next] | [standalone]


#11396

FromAlex Mestiashvili <amestia@rsh2.donotuse.de>
Date2019-03-21 12:10 +0100
Message-ID<xE3K9-1kN-5@gated-at.bofh.it>
In reply to#11394
On 3/21/19 11:44 AM, MARIE Alexandre wrote:
>> Is there really the leading tab only on the second line?
> 
> In fact I am trying to figure out where should I install the doc, and how could I avoid the lintian tag : privacy-breach-generic.
> 
>> What exactly doesn't seem to work?
> 
> The code I paste before wasn't working because the path was not good, I should have cleaned that before, sorry.
> 
> First I have this overrided to use the right method : 
> _____________________________________________________________
> override_dh_installdocs-indep:
> 	PYTONPATH=$(CURDIR)/debian python3 setup.py build_doc
> 	dh_installdocs
> _____________________________________________________________
> 
> Then I want to deal with mathjax causing the privacy-breach-generic.
> But I really don't know how to do that.
> 
> Cheers,
> 
> Alex
> 
> 

Hi,

I didn't have time to look into issue, but may be looking on how other
people solve similar problems will give you a hint:

 https://codesearch.debian.net/search?q=path%3Adebian%2Frules+mathjax

Best,
Alex

[toc] | [prev] | [next] | [standalone]


#11397

FromMARIE Alexandre <alexandre.marie@synchrotron-soleil.fr>
Date2019-03-21 12:20 +0100
Message-ID<xE3TP-1o4-5@gated-at.bofh.it>
In reply to#11396
> Hi,
> 
> I didn't have time to look into issue, but may be looking on how other
> people solve similar problems will give you a hint:
>
>  https://codesearch.debian.net/search?q=path%3Adebian%2Frules+mathjax
>
> Best,
> Alex

Hello,
Thanks for the hint, 
this is where I am looking to deal with the issue, 
but there are things that I don't understand,
thus I'm asking it here.

Cheers,

Alex

[toc] | [prev] | [next] | [standalone]


#11398

FromDmitry Shachnev <mitya57@debian.org>
Date2019-03-21 12:40 +0100
Message-ID<xE4db-1uC-3@gated-at.bofh.it>
In reply to#11391

[Multipart message — attachments visible in raw view] — view raw

Hi Marie!

On Thu, Mar 21, 2019 at 10:09:22AM +0000, MARIE Alexandre wrote:
> Hello,
>
> I'm still working on the package python-xrayutilities for debian.
>
> I've come to a point where the package can be built but when generating the doc,
> lintian comes with a bunch of privacy-generic-breach tags like this :
>
> W: python-xrayutilities-doc: privacy-breach-generic [...]
> (https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=tex-ams-mml_htmlormml)
>
> I have tried to add in debian/rules this :
> override_dh_installdocs:
>         ln -s /usr/share/javascript/mathjax/MathJax.js $(CURDIR)/doc/build/html/_static/MathJax.js
>         find doc/build/html -name "*.html" -exec sed -i "s|https://cdn.mathjax.org/mathjax/latest/MathJax.js|_static/MathJax.js|" {} \;
>         dh_installdocs -ppython-xrayutilities-doc doc/build/html
>
> But it does not seem to work.

Don’t do anything in debian/rules. Instead, patch your conf.py to
have a line like this:

  mathjax_path = 'file:///usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML'

This way the files produced by Sphinx will have the right path, and there
won’t be any need for making symlinks.

--
Dmitry Shachnev
(maintainer of both sphinx and mathjax packages)

[toc] | [prev] | [next] | [standalone]


#11399

FromDmitry Shachnev <mitya57@debian.org>
Date2019-03-21 12:50 +0100
Message-ID<xE4mR-1ya-1@gated-at.bofh.it>
In reply to#11398

[Multipart message — attachments visible in raw view] — view raw

On Thu, Mar 21, 2019 at 02:36:01PM +0300, Dmitry Shachnev wrote:
> Hi Marie!

Perhaps this should have been ‘Hi Alexandre’. Sorry if I got this wrong.

--
Dmitry Shachnev

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.maint.python


csiph-web