Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix Makefile test runner for Debian #73

Merged
merged 1 commit into from
Jun 1, 2015

Conversation

aspiers
Copy link
Member

@aspiers aspiers commented May 27, 2015

On Debian, python2 isn't in the $PATH, so falling back to python should at least get the tests running OK, even if the #!/usr/bin/env python2 will still break:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634967

@aspiers
Copy link
Member Author

aspiers commented May 27, 2015

plus, you should substitute $(PYTHON) into the tar_scm.py shebang.

Yeah, that's annoying but probably makes sense :-( So you are suggesting to have a tar_scm.py.in and do a typical autoconf-style substitution in the Makefile which generates tar_scm.py? That will require .spec file changes but I can't immediately think of a better way to ensure it works on both Debian and ArchLinux. I'm open to other ideas.

@roman-neuhauser
Copy link

yep, that's my suggestion; i don't see any other options.

@roman-neuhauser
Copy link

hm, python2.7 also looks like a viable alternative. would that work in Debian?

@aspiers
Copy link
Member Author

aspiers commented May 28, 2015

I think it probably would - at least on my ancient Debian box here I see:

lrwxrwxrwx 1 root root 9 Oct 29  2012 /usr/bin/python -> python2.6*

@roman-neuhauser
Copy link

if you need to support both 2.7 and 2.6, then i guess $(call first_in_path,python2.7 python2.6) (maybe with python2 tacked on last) would be best.

@aspiers
Copy link
Member Author

aspiers commented May 28, 2015

@roman-neuhauser How does this look now?

@roman-neuhauser
Copy link

if the sed fails it'll leave an empty or partial $(DESTDIR)$(mylibdir)/tar_scm behind. i'd suggest

sed ... tar_scm.py > tar_scm.tmp
install -m 0755 tar_scm.tmp $(DESTDIR)$(mylibdir)/tar_scm

Partially addresses breakage introduced by openSUSE#54.

On Debian, python2 isn't in the $PATH, so falling back to python-2.x
or python should work.

See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634967
@aspiers
Copy link
Member Author

aspiers commented May 29, 2015

How's that?

@roman-neuhauser
Copy link

that looks fine, thanks!

aspiers added a commit that referenced this pull request Jun 1, 2015
fix Makefile test runner for Debian
@aspiers aspiers merged commit dd92fb8 into openSUSE:master Jun 1, 2015
@aspiers aspiers deleted the python-search branch June 1, 2015 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants