Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 304641 - dev-python/docutils-0.6: buildhtml.py doesn't work with Python 3
Summary: dev-python/docutils-0.6: buildhtml.py doesn't work with Python 3
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal with 1 vote (vote)
Assignee: Python Gentoo Team
URL: http://thread.gmane.org/gmane.text.do...
Whiteboard:
Keywords:
: 304415 306183 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-02-11 22:53 UTC by Dmitriy Baranov
Modified: 2010-06-07 23:26 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,34.82 KB, text/plain)
2010-02-12 17:54 UTC, Chris Beswick
Details
emerge --info (emerge.info.txt,3.72 KB, text/plain)
2010-02-12 17:55 UTC, Chris Beswick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitriy Baranov 2010-02-11 22:53:54 UTC
in ebuild:

- 57:
PYTHONPATH=.. "$(PYTHON -f)" ./buildhtml.py --stylesheet-path=../html4css1.css --traceback .. || die "buildhtml.py failed"

+ 57:
PYTHONPATH=.. "${python}" ./buildhtml.py --stylesheet-path=../html4css1.css --traceback .. || die "buildhtml.py failed"


Reproducible: Always
Comment 2 Chris Beswick 2010-02-12 17:54:58 UTC
Created attachment 219365 [details]
build.log

Assuming this is the same bug, here is a build log.
Comment 3 Chris Beswick 2010-02-12 17:55:52 UTC
Created attachment 219367 [details]
emerge --info

and my emerge --info output
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2010-02-13 17:35:09 UTC
*** Bug 304415 has been marked as a duplicate of this bug. ***
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2010-02-21 12:59:22 UTC
*** Bug 306183 has been marked as a duplicate of this bug. ***
Comment 6 Jens Maus 2010-02-23 22:44:01 UTC
I am having the very same problem here when I want to install "trac" which itelf requires the "dev-python/docutils-0.6" package. Its build breaks with the following error message:

-- cut here --
  File "./buildhtml.py", line 188
    print "no os.walk"
                     ^
SyntaxError: invalid syntax
 * ERROR: dev-python/docutils-0.6 failed:
 *   buildhtml.py failed
 * 
 * Call stack:
 *     ebuild.sh, line  54:  Called src_compile
 *   environment, line 4107:  Called die
 * The specific snippet of code:
 *       PYTHONPATH=.. "$(PYTHON -f)" ./buildhtml.py --stylesheet-path=../html4css1.css --traceback .. || die "buildhtml.py failed";
-- cut here --

Is there any known workaround or bugfix yet?
Comment 7 Dustin C. Hatch 2010-02-24 01:22:12 UTC
(In reply to comment #6)
> 
> Is there any known workaround or bugfix yet?
> 

For me, simply uninstalling Python 3 allowed me to build docutils. I don't have anything that uses, nay works with, Python 3 right now anyway. Even if you do, you should be able to just reinstall it as soon as docutils builds.
Comment 8 Alexey Shvetsov archtester gentoo-dev 2010-02-24 15:19:05 UTC
Same here
Comment 9 Jan Essert 2010-02-24 15:34:34 UTC
As far as I can see, the problem is simply that this package is not yet ready for python 3. From the homepage:

"From version 0.6 Docutils is compatible with Python 3, but requires 2to3."

So IMHO either 2to3 has to be hacked into the ebuild or python 3 building has to be disabled.

Could you perhaps just do the latter for the time being, so that everybody gets the newest docutils version? That would be great!

AFAIK, one only needs to remove the second line of the ebuild, which is

SUPPORT_PYTHON_ABIS="1"

In addition, one might need to remove the thing about the tests not being python 3 compatible in src_test() [which is strange since it does not even compile..] and DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES.

I do not have a Gentoo machine right here, otherwise I would test this.
Comment 10 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-02-28 13:38:16 UTC
I have temporarily restricted 3.* ABIs until final fix is found.
Comment 11 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-06-02 18:21:37 UTC
Fixed in dev-python/docutils-0.7_pre6334.
Comment 12 DrChandra the Gentoo Person 2010-06-07 23:12:26 UTC
(In reply to comment #11)
> Fixed in dev-python/docutils-0.7_pre6334.
> 

I does not appear to be fixed in that release:

 * ERROR: dev-python/docutils-0.7_pre6334 failed:
 *   buildhtml.py failed
 * 
 * Call stack:
 *     ebuild.sh, line  54:  Called src_compile
 *   environment, line 4686:  Called die
 * The specific snippet of code:
 *       PYTHONPATH="../build-$(PYTHON -f --ABI)/lib" "$(PYTHON -f)" $([[ -f ../build-$(PYTHON -f --ABI)/lib/tools/buildhtml.py ]] && echo ../build-$(PYTHON -f --ABI)/lib/tools/buildhtml.py || echo ../tools/buildhtml.py) --stylesheet-path=../html4css1.css --traceback .. || die "buildhtml.py failed";
Comment 13 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-06-07 23:26:07 UTC
(In reply to comment #12)

You probably use wrong locale. See bug #322545.