xiazcy commented on code in PR #1797:
URL: https://github.com/apache/tinkerpop/pull/1797#discussion_r961926226


##########
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:
   That is one thing I wasn't sure of, how much the impact would be to release, 
not only with the set up removed, but also with the packaging taken inside of 
docker. I don't have any experiences with `pypi` releases though, I don't 
imagine there is any `mock release` to try? In any case, we could move the 
necessary python environment set up into the release profile to make sure it 
still works.
   
   Some other options could be to move the packaging stage for python back into 
maven, so we keep the environment set up, to be sure it works the same way as 
before for package and release. Then down the road we could consider putting 
both package and release into Docker.   



-- 
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]

Reply via email to