tkhyn / l18n Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Original report by Erik Cederstrand (Bitbucket: ecederstrand, GitHub: ecederstrand).
I'd like to add support for translating a pytz timezone (e.g. "Europe/Copenhagen") to a Windows timezone name (e.g. "Romance Standard Time"). Can you provide some hints on how to accomplish this? The data is available at http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml
Hi there,
It looks like l18n looks for a version of pytz matching its own version number:
Lines 115 to 118 in 0dd6ac8
The new release of l18n is called 2020.6, but the latest release of pytz is 2020.1, causing the installation to fail.
I'm wondering if there is any reason why wheels (.whl) are not being published in addition to the source distributions? One advantage to wheels from the python infrastructure standpoint is they install much faster as PyPI is able to pre-resolve the dependencies. And if your package is "pure" python (no C extensions) then building a wheel is very simple.
I am trying to optimize our dependency tree (coderedcms) and am therefore reaching out to any of our dependencies who do not yet publish in wheel format. Let me know if you are able to do this - I would be happy to help.
The command to build both source distribution and wheel is:
$ python setup.py sdist bdist_wheel
Then upload both as usual to PyPI.
For more into see: https://pythonwheels.com/
On debian this timezone is present in tzdata 2021e-1
.
Original report by Anonymous.
Pytz is often updated to pull in the latest timezone database; pinning the version is quite unfortunate and raises obtuse errors if packages are installed in the wrong order:
pkg_resources.ContextualVersionConflict: (pytz 2016.6.1 (/Users/amcgregor/Projects/marrow/lib/python3.5/site-packages), Requirement.parse('pytz==2016.4'), {'l18n'})
Original report by Philipp Steinhardt (Bitbucket: Phist0ne, GitHub: Phist0ne).
The targets install and bdist should imho contain the locale directory if I am not mistaken.
Otherwise the module would not be quite usable if installed via e.g. pip install.
Running pip install l18n==2020.6.1
under Python 3.10.0 on macOS 10.14.6 fails with the following output:
Collecting l18n==2020.6.1
Using cached l18n-2020.6.1.tar.gz (50 kB)
ERROR: Command errored out with exit status 1:
command: /Users/matthew/.virtualenvs/wagtail310/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/p6/_51b92q88xj9kk0059bc8f3h0000gn/T/pip-install-ec0j8s9h/l18n_9ffec079b1454debad1ec881dc09974e/setup.py'"'"'; __file__='"'"'/private/var/folders/p6/_51b92q88xj9kk0059bc8f3h0000gn/T/pip-install-ec0j8s9h/l18n_9ffec079b1454debad1ec881dc09974e/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/p6/_51b92q88xj9kk0059bc8f3h0000gn/T/pip-pip-egg-info-p88jtkev
cwd: /private/var/folders/p6/_51b92q88xj9kk0059bc8f3h0000gn/T/pip-install-ec0j8s9h/l18n_9ffec079b1454debad1ec881dc09974e/
Complete output (12 lines):
Traceback (most recent call last):
File "/private/var/folders/p6/_51b92q88xj9kk0059bc8f3h0000gn/T/pip-install-ec0j8s9h/l18n_9ffec079b1454debad1ec881dc09974e/setup.py", line 74, in <module>
cmd_module = getattr(__import__('setuptools.command', fromlist=[cmd]),
AttributeError: module 'setuptools.command' has no attribute 'bdist_wininst'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/p6/_51b92q88xj9kk0059bc8f3h0000gn/T/pip-install-ec0j8s9h/l18n_9ffec079b1454debad1ec881dc09974e/setup.py", line 78, in <module>
cmd_module = getattr(__import__('distutils.command', fromlist=[cmd]),
AttributeError: module 'distutils.command' has no attribute 'bdist_wininst'
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/26/14/55b76b4ecbe44f1eb133f5983a2cd0aa1e633d5e34a73f2605d7a20a7ca0/l18n-2020.6.1.tar.gz#sha256=ea7a65b2f0935b14601a3295f2c5e5e8b54126dd1e6a7fef4e44d2b8dd5b695a (from https://pypi.org/simple/l18n/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement l18n==2020.6.1 (from versions: 2014.10.1, 2015.2, 2015.6, 2015.7, 2016.4, 2016.6, 2016.6.1, 2016.6.2, 2016.6.3, 2016.6.4, 2018.5, 2020.6, 2020.6.1)
ERROR: No matching distribution found for l18n==2020.6.1
Apparently the bdist_wininst command is now removed: https://docs.python.org/3.10/whatsnew/3.10.html#distutils
Original report by David Moore (Bitbucket: linuxsoftware, GitHub: linuxsoftware).
When using Python 3.4 or 3.5 on an operating system where the operating system locale does not use UTF-8 - trying to read the text "Île de Pâques" in the README.rst causes a UnicodeDecodeError.
This is because when setup.py does an open of the README it doesn't provide an encoding, so Python falls back to whatever the operating system encoding is, which doesn't work if it is ASCII.
Possible fixes are: provide a UTF-8 encoding argument for open on Python3, or just remove the problem text and use another example.
Thanks.
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.