stefankoegl / python-json-pointer

Resolve JSON Pointers in Python
https://python-json-pointer.readthedocs.org/
Other
140 stars 43 forks source link

Fix problem creating rpm in python2.7 #29

Closed jorgecis closed 4 months ago

jorgecis commented 6 years ago

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)
stefankoegl commented 6 years ago

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?

dgalaska commented 3 years ago

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.

stefankoegl commented 4 months ago

Closing as Python 2.7 is no longer supported.