Description
I tried to use the Python2 bindings in the development mode via `python setup.py develop` or `pip install -e .`, but got the following error.
~/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
The following patch seems to fix this problem.
(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,
Attachments
Issue Links
- links to