mecforlove / ecoji-py Goto Github PK
View Code? Open in Web Editor NEWEncode and decode data as emojis, in Python
License: Apache License 2.0
Encode and decode data as emojis, in Python
License: Apache License 2.0
When attempting to install on windows the README.md file injected as the long_description
in setup.py
is causing failure to validate:
This can be reproduced with
pip install ecoji
Resulting in the following:
Using cached ecoji-0.1.0.tar.gz (6.5 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [23 lines of output]
Traceback (most recent call last):
File "C:\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "C:\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Win10x64\AppData\Local\Temp\pip-build-env-x225l619\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Win10x64\AppData\Local\Temp\pip-build-env-x225l619\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires
self.run_setup()
File "C:\Users\Win10x64\AppData\Local\Temp\pip-build-env-x225l619\overlay\Lib\site-packages\setuptools\build_meta.py", line 487, in run_setup
super().run_setup(setup_script=setup_script)
File "C:\Users\Win10x64\AppData\Local\Temp\pip-build-env-x225l619\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 9, in <module>
File "C:\Python312\Lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 10: character maps to <undefined>
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
The issue can also be seen when attempting to install directly from the repository:
PS C:\Users\Win10x64\Projects\ecoji-py> pip install setuptools
Collecting setuptools
Using cached setuptools-69.5.1-py3-none-any.whl.metadata (6.2 kB)
Using cached setuptools-69.5.1-py3-none-any.whl (894 kB)
Installing collected packages: setuptools
Successfully installed setuptools-69.5.1
PS C:\Users\Win10x64\Projects\ecoji-py> python setup.py install
Traceback (most recent call last):
File "C:\Users\Win10x64\Projects\ecoji-py\setup.py", line 9, in <module>
long_description=open("README.md").read(),
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 13: character maps to <undefined>
The repository direct install provides a more clear reason for the exception:
long_description=open("README.md").read(), ^^^^^^^^^^^^^^^^^^^^^^^^
A workaround is to overwrite README.md
to remove the unsupported character:
echo "redact README" > README.md
This will allow the installation to complete:
PS C:\Users\Win10x64\Projects\ecoji-py> echo "redact README" > .\README.md
PS C:\Users\Win10x64\Projects\ecoji-py> python setup.py install
running install
C:\Python312\Lib\site-packages\setuptools\_distutils\cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!
********************************************************************************
Please avoid running ``setup.py`` directly.
Instead, use pypa/build, pypa/installer or other
standards-based tools.
See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
********************************************************************************
!!
self.initialize_options()
C:\Python312\Lib\site-packages\setuptools\_distutils\cmd.py:66: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!
********************************************************************************
Please avoid running ``setup.py`` and ``easy_install``.
Instead, use pypa/build, pypa/installer or other
standards-based tools.
See https://github.com/pypa/setuptools/issues/917 for details.
********************************************************************************
!!
self.initialize_options()
running bdist_egg
running egg_info
writing ecoji.egg-info\PKG-INFO
writing dependency_links to ecoji.egg-info\dependency_links.txt
No work has been done to track down exactly when this started to impact Windows installs, however the simplest work around seems to be to remove the force the reader to open the file with emoji
characters embedded in the README.md
or shift to maintaining two descriptions
for the projectutf-8
encoding.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.