You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2019/07/04 09:24:00 UTC
[jira] [Commented] (AVRO-2424) Make Py2 bindings work on
setuptools' development mode
[ https://issues.apache.org/jira/browse/AVRO-2424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16878468#comment-16878468 ]
ASF subversion and git services commented on AVRO-2424:
-------------------------------------------------------
Commit 4317e4a2610555fe205e892ba0494f8bc6dcb2b4 in avro's branch refs/heads/master from Kengo Seki
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=4317e4a ]
AVRO-2424: Make Py2 bindings work on setuptools' development mode (#546)
* AVRO-2424: Make Py2 bindings work on setuptools' development mode
* AVRO-2424: Make Py2 bindings work on setuptools' development mode
Wrap the logic to get version information into a function.
* AVRO-2424: Make Py2 bindings work on setuptools' development mode
Consolidate the exclusion of *.egg-info for rat and .gitignore.
> Make Py2 bindings work on setuptools' development mode
> ------------------------------------------------------
>
> Key: AVRO-2424
> URL: https://issues.apache.org/jira/browse/AVRO-2424
> Project: Apache Avro
> Issue Type: Improvement
> Components: python
> Reporter: Kengo Seki
> Assignee: Kengo Seki
> Priority: Major
>
> I tried to use the Python2 bindings in the [development mode|https://setuptools.readthedocs.io/en/latest/setuptools.html#development-mode] via `python setup.py develop` or `pip install -e .`, but got the following error.
> {code}
> ~/repo/avro/lang/py$ mkvirtualenv avro
> (snip)
> (avro) ~/repo/avro/lang/py$ python setup.py develop
> /home/sekikn/.virtualenvs/avro/local/lib/python2.7/site-packages/setuptools/dist.py:481: UserWarning: The version specified ('@AVRO_VERSION@') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.
> "details." % self.metadata.version
> (snip)
> Installed /home/sekikn/repo/avro/lang/py
> Processing dependencies for avro===-AVRO-VERSION-
> Finished processing dependencies for avro===-AVRO-VERSION-
> (avro) sekikn@sekikn-ProLiant-ML110-G6:~/repo/avro/lang/py$ python -c "import avro"
> Traceback (most recent call last):
> File "<string>", line 1, in <module>
> ImportError: No module named avro
> {code}
> The following patch seems to fix this problem.
> {code}
> (avro) ~/repo/avro/lang/py$ git diff
> diff --git a/lang/py/setup.py b/lang/py/setup.py
> index 0d3c9b9e..9ebc3e05 100755
> --- a/lang/py/setup.py
> +++ b/lang/py/setup.py
> @@ -29,7 +29,7 @@ setup(
> name = 'avro',
> version = '@AVRO_VERSION@',
> packages = ['avro',],
> - package_dir = {'avro': 'src/avro'},
> + package_dir = {'': 'src'},
> scripts = ["./scripts/avro"],
>
> #include_package_data=True,
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)