[ 
https://issues.apache.org/jira/browse/BEAM-8238?focusedWorklogId=312688&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-312688
 ]

ASF GitHub Bot logged work on BEAM-8238:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 15/Sep/19 17:11
            Start Date: 15/Sep/19 17:11
    Worklog Time Spent: 10m 
      Work Description: chadrik commented on issue #9572: [BEAM-8238] Improve 
python gen_protos script
URL: https://github.com/apache/beam/pull/9572#issuecomment-531582727
 
 
   Here's the relevant code showing that sdist always runs egg_info:
   
   ```python
   class sdist(sdist_add_defaults, orig.sdist):
       """Smart sdist that finds anything supported by revision control"""
   
       user_options = [
           ('formats=', None,
            "formats for source distribution (comma-separated list)"),
           ('keep-temp', 'k',
            "keep the distribution tree around after creating " +
            "archive file(s)"),
           ('dist-dir=', 'd',
            "directory to put the source distribution archive(s) in "
            "[default: dist]"),
       ]
   
       def run(self):
           self.run_command('egg_info')
           ei_cmd = self.get_finalized_command('egg_info')
           self.filelist = ei_cmd.filelist
           self.filelist.append(os.path.join(ei_cmd.egg_info, 'SOURCES.txt'))
           self.check_readme()
   
           # Run sub commands
           for cmd_name in self.get_sub_commands():
               self.run_command(cmd_name)
   
           self.make_distribution()
   
           dist_files = getattr(self.distribution, 'dist_files', [])
           for file in self.archive_files:
               data = ('sdist', '', file)
               if data not in dist_files:
                   dist_files.append(data)
   ```
   
   The gen_protos check was running twice when running `python setup.py sdist`. 
 With only egg_info wrapped, it only runs once.
   
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 312688)
    Time Spent: 50m  (was: 40m)

> Improve python gen_protos script
> --------------------------------
>
>                 Key: BEAM-8238
>                 URL: https://issues.apache.org/jira/browse/BEAM-8238
>             Project: Beam
>          Issue Type: Improvement
>          Components: build-system, sdk-py-core
>            Reporter: Chad Dombrova
>            Assignee: Chad Dombrova
>            Priority: Major
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Issues that need to be solved:
> - doesn't print output to shell when run during `python setup.py`
> - runs futurize twice when grcpio-tools is not present and needs to be 
> installed
> - does not account for the case where there are more output files than .proto 
> files (just keeps triggering out-of-date rebuilds due to timestamp of 
> orphaned output file)
> - plus it would be nice for debugging if the script printed why it is 
> regenerating pb2 files, because there are a number of possible reasons



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to