Open rgammans opened 10 years ago
On Nov 10, 2014, at 4:46 PM, Roger Gammans notifications@github.com wrote:
With git bisect to narrow the issue down to commit 2f73871 .
If I revert this commit , I can then install can import dabo. I note there is a comment on that commit about issues too.
Running setup.py from the source seems to require a different configuration than simply running 'pip install dabo', which works with the sdist version on PyPI.
If you (or anyone else) knows how to create packages that work equally well with both types of installation methods, I would appreciate the help!
In the meantime, there are workarounds. Assuming that your virtualenv's site-packages is located in "/tmp/dabotest/lib/python2.7/site-packages", you could copy the locale files from the cloned source. In other words, try modifying your script as follows:
1 (cd ..
2 virtualenv env
3 (
4 . env/bin/activate
5 cd dabo_src
6 python setup.py install
7 cp -R dabo/locale /tmp/dabotest/lib/python2.7/site-packages/Dabo-0.9.14-py2.7.
egg/dabo/
8 cd ..
9 python -c 'import dabo'
10 OK=$?
11 deactivate
12 exit $OK
13 )
14 OK=$?
15 rm -rf env
16 exit $OK
17 )
18 exit $?
-- Ed Leafe
The version on PyPi is reported 0.9.6 , which predates the problematic commit.
I'll try to create a sdist later and do some testing via that.
On Nov 11, 2014, at 7:49 AM, Roger Gammans notifications@github.com wrote:
The version on PyPi is reported 0.9.6 , which predates the problematic commit.
Huh, I guess the last few releases we forgot to push to PyPI.
I'll try to create a sdist later and do some testing via that.
I did some digging, and as usual, Stack Overflow provided the answer:
Basically, we need to include the locale files in both the MANIFEST.in and the data_files.
-- Ed Leafe
On Nov 11, 2014, at 9:15 AM, Ed Leafe ed@leafe.com wrote:
I did some digging, and as usual, Stack Overflow provided the answer:
Basically, we need to include the locale files in both the MANIFEST.in and the data_files.
I just pushed a fix to the working branch on GitHub. Can you test with that and let me know how it works?
-- Ed Leafe
Thanks, Ed. I can confirm this pass my simple test and the apps I'm currently working on run Ok with it.
I am using Anaconda Python and installed wxpython via conda install wx
and then installed a fork of this git repo via python setup.py install
and I got the same initial error at the OP:
[~/prg/dabo/demo]$ python DaboDemo.py
2015-03-16 13:02:14 - ERROR -
No translation file found for domain 'dabo'.
Locale dir = /Users/anicca/prg/dabo/demo/locale
Languages = ['en_US']
Codeset = UTF-8
Traceback (most recent call last):
File "DaboDemo.py", line 6, in <module>
import dabo
File "/Users/anicca/anaconda/lib/python2.7/site-packages/Dabo-0.9.14-py2.7.egg/dabo/__init__.py", line 186, in <module>
dLocalize.install("dabo")
File "/Users/anicca/anaconda/lib/python2.7/site-packages/Dabo-0.9.14-py2.7.egg/dabo/dLocalize.py", line 79, in install
setLanguage(_defaultLanguage, _defaultEncoding)
File "/Users/anicca/anaconda/lib/python2.7/site-packages/Dabo-0.9.14-py2.7.egg/dabo/dLocalize.py", line 113, in setLanguage
daboTranslation = gettext.translation("dabo", daboLocaleDir, languages=["en"], codeset=charset)
File "/Users/anicca/anaconda/lib/python2.7/gettext.py", line 469, in translation
raise IOError(ENOENT, 'No translation file found for domain', domain)
IOError: [Errno 2] No translation file found for domain: 'dabo'
A bit of an update. Attempting to run the demo creates the problem. It does not happen if I simply attempt to import dabo:
[~/prg/dabo/demo]$ cd ..
[~/prg/dabo]$ python -c 'import dabo'
[~/prg/dabo]$
Ditto for AppWizard, ClassDesigner, and ReportDesigner.
Here is a transcript of a failure form the current git. I also create and install dabo into a virtualenv.
(see below for comments and some analysis)
I used a test script:-
With git bisect to narrow the issue down to commit 2f73871174081f5b1c2845b8afa2f06f3d2d6789 .
If I revert this commit , I can then install can import dabo. I note there is a comment on that commit about issues too.