python-json-pointer
python-json-pointer copied to clipboard
Fix problem creating rpm in python2.7
Running python setup.py bdist_rpm in pythn2.7, I didnt test any other python versions.
warning: pypandoc module not found, could not convert Markdown to RST
running bdist_rpm
Traceback (most recent call last):
File "setup.py", line 68, in <module>
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
File "/usr/lib64/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib64/python2.7/distutils/dist.py", line 971, in run_command
cmd_obj.ensure_finalized()
File "/usr/lib64/python2.7/distutils/cmd.py", line 109, in ensure_finalized
self.finalize_options()
File "/usr/lib64/python2.7/distutils/command/bdist_rpm.py", line 219, in finalize_options
self.finalize_package_data()
File "/usr/lib64/python2.7/distutils/command/bdist_rpm.py", line 227, in finalize_package_data
self.distribution.get_contact_email()))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 8: ordinal not in range(128)
Thanks for your report! Your patch seems to fail on Python 3, as it calls encode on a unicode string.
I'd like to narrow down the error. Can you please test if you can run python setup.py sdist
or python setup.py bdist_wheel
(with the wheel
package installed) on the unmodified code?
I recently had a need to package this as an RPM for python 2.7, and ran into this issue. The fix posted here was also how I worked around the issue. My command line was:
python2 setup.py bdist_rpm
The two commands in the previous response here were both successful. Apologies for necromancing a 2 year old pull request, but hopefully this is helpful.
Thanks.