mojohaus / rpm-maven-plugin

http://www.mojohaus.org/rpm-maven-plugin/
Other
56 stars 48 forks source link

Question: rpm-maven-plugin #135

Open YaelMagrafta opened 1 year ago

YaelMagrafta commented 1 year ago

Hi guys, I am using rpm-maven-plugin version 2.1.3 to create rpm file from a python package. I have a problem during the build, since the environment I'm using has python2.7 as default python, and that causes the bytecompilation to fail on python3 files. Unfortunately I cannot change the environment variable. I'm looking for a workaround - trying to force the bytecompile to be done with python3. As I understand, I can use the spec file that is created during the rpm build to do this. Is it possible? what parameter would I need to change? Many thanks!

psmith-trackvia commented 8 months ago

Just went through this ... here is what worked for me ... <defineStatement>__python 3</defineStatement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>rpm-maven-plugin</artifactId>
                <version>2.3.0</version>
                <configuration>
                    <defineStatements>
                        <defineStatement>__python 3</defineStatement>
                    </defineStatements>

Make sure you have /usr/bin/python3