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

Make Maven download the necessary python libraries that pyoracc uses #17

Closed
raquelalegre opened this issue Apr 17, 2015 · 1 comment
Closed

Comments

@raquelalegre
Copy link
Contributor

These plugin is working and easy_installing all the necessary python modules (although it gave some trouble with mako and jinja and I had to downgrade mako from v1.1 to v0.9.1), but they are not being properly imported by the jython code, can't figure out why.

            <plugin>
                <groupId>net.sf.mavenjython</groupId>
                <artifactId>jython-compile-maven-plugin</artifactId>
                <version>1.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>jython</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <libraries>
                        <param>nose</param>
                        <param>ply</param>
                        <param>https://pypi.python.org/packages/source/M/Mako/Mako-0.9.1.tar.gz</param>
                    </libraries>
                </configuration>
            </plugin>
@raquelalegre
Copy link
Contributor Author

That maven plugin is downloading the libraries (mako, ply and nose) to target/classes/Lib.
To make the Jython code find these libraries, the PYTHONPATH needs to be extended to include target/classes/Lib. This can be done In the main Java entry point, like so:

systemState.path.append(new PyString("target/classes/Lib"));

Works now! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant