spmallette commented on code in PR #1797:
URL: https://github.com/apache/tinkerpop/pull/1797#discussion_r961877497
##########
gremlin-python/pom.xml:
##########
@@ -83,102 +83,31 @@ limitations under the License.
</activation>
<build>
<plugins>
- <!-- need to create python-reports directory at this point
or else pytest can't write the report to it -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
+ <!-- copy source files in python directory to
target/, to keep testing separate from packaging.
+ We use target/python3 for testing and
target/python-packaged for distribution tasks.-->
<execution>
- <id>create-python-reports-directory</id>
- <phase>initialize</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <mkdir
dir="${project.build.directory}/python-reports"/>
- <mkdir
dir="${project.build.directory}/python-packaged/env"/>
- </target>
- </configuration>
- </execution>
- <!-- copy files in python directory to target/py
and run virtual env to sandbox python.
- there is no need to "activate" the virtualenv
because all calls to python occur
- directly from bin/ -->
- <execution>
- <id>setup-py-env</id>
+ <id>setup-env</id>
<phase>process-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
- <!-- seems like we need a few
different copies of the same source. all the
- different python stuff doesn't
seem to want to share. we use
- /python3 for basic tests and
stuff and /python-packaged for distribution
- tasks. some of the problem seems
to stem from the python lifecycle not
- binding perfectly well to the
maven lifecycle (integration tests seems to
- cause troubles specifically).
note that the commands to install wheel are
- largely for safety in case
someone is using an older version of virtualenv
- (which doesn't install wheel by
default) -->
+ <!-- pytest will create python-reports
inside target/python3/python-reports
+ as docker compose cannot access
outside its working directory -->
<copy
todir="${project.build.directory}/python3">
<fileset dir="src/main/python"/>
</copy>
- <exec
dir="${project.build.directory}/python3" executable="python3"
- failonerror="true">
- <arg line="--version"/>
- </exec>
- <exec
dir="${project.build.directory}/python3" executable="virtualenv"
- failonerror="true">
- <arg line="--version"/>
- </exec>
- <exec
dir="${project.build.directory}/python3" executable="virtualenv"
Review Comment:
as i sit here admiring all this pom.xml code getting simplified behind
docker, i wonder if these changes will allow releases to actually work. for
example, here we get rid of the virtualenv setup of python3, wheel, setuptools,
etc. which would all be needed on release day (i think) when we deploy to pypi
with `-Dpypi`:
https://github.com/apache/tinkerpop/pull/1797/files#diff-924caaf2e60b71e4f805fe7d35f9c8895cb8d23ae258b12b7497b21d91ab639fR249-R269
thoughts?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]