Bug#857491: Computation of top_dir is fooled by README

2017-10-05 Thread Steve Robbins
On Thursday, October 5, 2017 6:37:51 PM CDT Anton Gladky wrote:
> Hi Steve,
> 
> thanks for the bug report. The simple solution to remove ".." from that
> list cause FTBFS of the package. One need to find more reliable
> solution.

Ah.  I had only done the editing on the installed file and it worked for my 
purposes.   In the worst case, perhaps it could be removed post-build,
after installing to debian/tmp.

-Steve


signature.asc
Description: This is a digitally signed message part.
-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers

Bug#857491: Computation of top_dir is fooled by README

2017-10-05 Thread Anton Gladky
Hi Steve,

thanks for the bug report. The simple solution to remove ".." from that
list cause FTBFS of the package. One need to find more reliable
solution.

Best regards

Anton

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers


Bug#857491: Computation of top_dir is fooled by README

2017-03-11 Thread Steve M. Robbins
Package: python-sfepy
Version: 2016.2-2
Severity: normal

I tried to run the examples using:

  sfepy-run simple examples/diffusion/poisson_short_syntax.py

and obtained:

  sfepy: left over: ['verbose', '__builtins__', '__file__', '__doc__', 
'__name__', 'data_dir', '__package__', '_filename']
  sfepy: reading mesh [line2, tri3, quad4, tetra4, hexa8] 
(/usr/lib/python2.7/dist-packages/meshes/3d/cylinder.mesh)...

... which fails because the mesh path is wrong.  There needs to be a sfepy 
after dist-packages.


The root cause of this is the computation of "top_dir" in version.py:

# If installed, up_dir is '.', otherwise (in (git) source directory) '..'.
for up_dir in ['..', '.']:
top_dir = op.normpath(op.realpath(op.join(op.dirname(__file__),
  up_dir)))
aux = op.join(top_dir, 'README')
if op.isfile(aux):
break
else:
raise RuntimeError('cannot determine SfePy top level directory!')

The trouble is that ".." is tried first and there happens to be a README file
at that path: /usr/lib/python2.7/dist-packages/README !

There's an obvious Debian-only fix to remove '..' in version.py, which is
what I've done locally for now.




-- System Information:
Debian Release: 9.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python-sfepy depends on:
ii  ipython   5.1.0-3
ii  libc6 2.24-9
ii  libsuitesparse-dev1:4.5.4-1
ii  mayavi2   4.5.0-1
ii  python2.7.13-2
ii  python-matplotlib 2.0.0+dfsg1-2
ii  python-numpy [python-numpy-abi9]  1:1.12.0-2
ii  python-pyparsing  2.1.10+dfsg1-1
ii  python-scipy  0.18.1-2
ii  python-sparse 1.1.1-1
ii  python-tables 3.3.0-5
pn  python:any

python-sfepy recommends no packages.

python-sfepy suggests no packages.

-- no debconf information

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers