You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Kengo Seki (Jira)" <ji...@apache.org> on 2020/04/07 14:49:00 UTC

[jira] [Created] (AVRO-2791) Fix lang/py3/build.sh to process each argument separately

Kengo Seki created AVRO-2791:
--------------------------------

             Summary: Fix lang/py3/build.sh to process each argument separately
                 Key: AVRO-2791
                 URL: https://issues.apache.org/jira/browse/AVRO-2791
             Project: Apache Avro
          Issue Type: Bug
          Components: build, python
            Reporter: Kengo Seki
            Assignee: Kengo Seki


I ran {{./build.sh clean test}} in the lang/py3 directory and came across the following error:

{code}
$ ./build.sh docker
sekikn@2241fc3fd5a3:~/avro$ cd lang/py3
sekikn@2241fc3fd5a3:~/avro/lang/py3$ ./build.sh clean test
running clean
removing 'avro_python3.egg-info' (and everything under it)
Removing /home/sekikn/avro/lang/py3/avro/VERSION.txt
removing '/home/sekikn/avro/lang/py3/avro/__pycache__' (and everything under it)
Removing /home/sekikn/avro/lang/py3/avro/HandshakeResponse.avsc
Removing /home/sekikn/avro/lang/py3/avro/HandshakeRequest.avsc
removing '/home/sekikn/avro/lang/py3/avro/tests/__pycache__' (and everything under it)
Removing /home/sekikn/avro/lang/py3/avro/tests/interop.avsc
running test
WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.
running egg_info
creating avro_python3.egg-info
writing avro_python3.egg-info/PKG-INFO
writing requirements to avro_python3.egg-info/requires.txt
writing dependency_links to avro_python3.egg-info/dependency_links.txt
writing top-level names to avro_python3.egg-info/top_level.txt
writing manifest file 'avro_python3.egg-info/SOURCES.txt'
reading manifest file 'avro_python3.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'avro/HandshakeRequest.avsc'
warning: no files found matching 'avro/HandshakeResponse.avsc'
warning: no files found matching 'avro/VERSION.txt'
writing manifest file 'avro_python3.egg-info/SOURCES.txt'
running build_ext
error: [Errno 2] No such file or directory: '/home/sekikn/avro/lang/py3/avro/VERSION.txt'
{code}

This is because the main function is implemented as follows. If the arguments {{clean test}} are passed to that function, a single command {{python3 setup.py clean test}} is called.
Instead, it should call {{setup.py}} for each argument in the for-loop.

{code}
main() {

  (snip)

  for target; do
    case "$target" in
      lint) set -- isort "$@";;
      clean|dist|isort|test) :;;
      *) usage; return 1;;
    esac
  done
  python3 setup.py "$@"
}
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)