On Sun, Oct 11, 2020 at 01:06:56AM -0400, Daniel Dickman wrote:
> piglit is a consumer of python2 numpy. because newer versions of numpy are
> python3-only, the diff below proposes to move piglit from python2 to
> python3 so numpy can be updated.
>
> By moving to python3 we can also get rid of the py-subprocess32
> dependency.
>
> I don't know too much about piglit but I was able to run "piglit run
> sanity results" on my amd64 box.
>
> The one nice thing about moving from py2 to py3 is that "make
> update-plist" repairs some of the odd substitutions that are in the
> current PLIST. So a bunch of the PLIST changes below are just due to:
>
> "co${MODPY_PY_PREFIX}" -> "copy-"
I had a similar diff once but didn't submit due to lack of proper
testing; actual piglit users need to *run* with this.
Are you sure this runs with Python 3 (alone) for you?
After "make fake" with your diff, I see
$ (cd `make show=WRKINST` && grep -r '^#!')
./usr/local/bin/piglit:#!/usr/bin/env python2
./usr/local/lib/piglit/tests/apitrace/test-trace.py:#!/usr/bin/env
python
./usr/local/lib/piglit/tests/glslparsertest/glsl2/gen_builtin_test.py:#!/usr/bin/env
python
./usr/local/lib/piglit/tests/oglconform.py:#!/usr/bin/env python
./usr/local/lib/piglit/tests/vulkan.py:#!/usr/bin/env python
The main script needs fixing, not sure about the rest but it doesn't
hurt to zap py2 usage entirely.
I quickly amended the following to post-install and redid fake/package
after grepping to avoid MODPY_ADJ_FILES, hence changing WRKSRC and thus
having to rebuild:
${MODPY_BIN_ADJ} ${PREFIX}/bin/piglit
Perhaps worth fixing as well (during configure):
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_POLICY_DEFAULT_CMP0056
PYTHON_INCLUDE_DIR
PYTHON_LIBRARY_DIRS
We define the first which can now be omitted, I guess.