Solved Trying to port python-vlc : trouble during the build phase

hukadan

Well-Known Member

Reaction score: 257
Messages: 407

Hello everyone,

I am trying to port python-vlc to FreeBSD (in order to port castero, a nice TUI podcast client). Here is my Makefile.
Code:
# $FreeBSD$

PORTNAME=        vlc
PORTVERSION=     3.0.6108
CATEGORIES=      python
PKGNAMEPREFIX=   ${PYTHON_PKGNAMEPREFIX}                                      

USE_GITHUB=      yes
GH_ACCOUNT=      oaubert
GH_PROJECT=      python-vlc
GH_TAGNAME=      fff0541

MAINTAINER=      [EMAIL]hukadan@protonmail.com[/EMAIL]
COMMENT=         ctypes-based bindings for the native libvlc API of the VLC video player.
LICENSE=         LGPL21+

NO_ARCH=         yes
USES=            python
USE_PYTHON=      autoplist concurrent distutils allflavors                    

PYSETUP=         generated/3.0/setup.py
PYDISTUTILS_PKGNAME=    python-vlc

.include <bsd.port.mk>
Now, if I try make build, it gives me the following output (emphasize added).
Code:
% make build
===>  License LGPL21+ accepted by the user
===>   py27-vlc-3.0.6108 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by py27-vlc-3.0.6108 for building
===>  Extracting for py27-vlc-3.0.6108
=> SHA256 Checksum OK for oaubert-python-vlc-3.0.6108-fff0541_GH0.tar.gz.
===>  Patching for py27-vlc-3.0.6108
===>   py27-vlc-3.0.6108 depends on package: py27-setuptools>0 - found
===>   py27-vlc-3.0.6108 depends on file: /usr/local/bin/python2.7 - found
===>  Configuring for py27-vlc-3.0.6108
running config
===>  Building for py27-vlc-3.0.6108
running build
running build_py
[B]file vlc.py (for module vlc) not found
file vlc.py (for module vlc) not found[/B]
Now, if I go in the work-py27/python-vlc-fff0541/generated/3.0/ folder and try python2.7 setup.py build, here is the result.
Code:
% python2.7 setup.py build
running build
running build_py
creating build
creating build/lib
copying vlc.py -> build/lib
Looking at /usr/ports/Mk/Uses/python.mk, it is said that (emphasize added) :
Code:
# PYDISTUTILS_BUILDARGS
#                       - Arguments to build with distutils.
#                         [B]default: <empty>[/B]
Therefore, I would expect make build to give the same output as python2.7 setup.py build.

I am missing something but cannot find what. Any help would be appreciated.

Thank you.
 
OP
OP
hukadan

hukadan

Well-Known Member

Reaction score: 257
Messages: 407

I will answer to my own stupidity question. The command issued during make build is python2.7 generated/3.0/setup.by build and not python2.7 setup.py build. It is litteraly written in the Makefile. I don't know how I missed that. Sorry for the noise.
 
Top