knowark / facturark

Facturación Electrónica en Python
GNU Lesser General Public License v3.0
3 stars 4 forks source link

Making facturark a module dependencay breaks the odoo install process #18

Open blaggacao opened 5 years ago

blaggacao commented 5 years ago
importlib.import_module(pydep)
ImportError: ImportError("No module named 'facturark.analyzer'",)

The root cause should be the same as #9 but this makes it all the more pressing to fix the imports...

blaggacao commented 5 years ago

The problem seems that the install does not work properly, see:

(py35) ~/xoe/odoo/facturark (master) ! $ ls /home/blaggacao/xoe/odoo/facturark/.tox/py35/lib/python3.5/site-packages/facturark/
api.py  builder.py  __init__.py  __main__.py  namespaces.py  __pycache__  resolver.py  utils.py

No subpackages get installed... Once doing pip install -e . (dev install), things start to work. However, that's not the idea.

blaggacao commented 5 years ago

Voila

>>> from setuptools import find_packages
>>> find_packages()
['tests', 'facturark', 'tests.imager', 'tests.composers', 'tests.identifier', 'tests.client', 'tests.signer', 'tests.validator', 'tests.analyzer', 'tests.signer.composers', 'facturark.imager', 'facturark.composers', 'facturark.identifier', 'facturark.client', 'facturark.signer', 'facturark.validator', 'facturark.analyzer', 'facturark.signer.composers', 'facturark.signer.composers.xades', 'facturark.validator.values']
>>> find_packages(include=['facturark'])
['facturark']
>>>
blaggacao commented 5 years ago

After #20, now we're talking:

(py35) ~/xoe/odoo/facturark (master)  $ ll /home/blaggacao/xoe/odoo/facturark/.tox/py35/lib/python3.5/site-packages/facturark/
total 160
drwxr-xr-x  10 blaggacao blaggacao  4096 Dec 13 19:12 ./
drwxr-xr-x 133 blaggacao blaggacao 28672 Dec 13 19:12 ../
drwxr-xr-x   3 blaggacao blaggacao  4096 Dec 13 19:12 analyzer/
-rw-r--r--   1 blaggacao blaggacao  1665 Dec 13 19:12 api.py
-rw-r--r--   1 blaggacao blaggacao   851 Dec 13 19:12 builder.py
drwxr-xr-x   3 blaggacao blaggacao  4096 Dec 13 19:12 client/
drwxr-xr-x   3 blaggacao blaggacao  4096 Dec 13 19:12 composers/
drwxr-xr-x   3 blaggacao blaggacao  4096 Dec 13 19:12 identifier/
drwxr-xr-x   3 blaggacao blaggacao  4096 Dec 13 19:12 imager/
-rw-r--r--   1 blaggacao blaggacao   421 Dec 13 19:12 __init__.py
-rw-r--r--   1 blaggacao blaggacao  4494 Dec 13 19:12 __main__.py
-rw-r--r--   1 blaggacao blaggacao  1443 Dec 13 19:12 namespaces.py
drwxr-xr-x   2 blaggacao blaggacao  4096 Dec 13 19:12 __pycache__/
-rw-r--r--   1 blaggacao blaggacao  6282 Dec 13 19:12 resolver.py
drwxr-xr-x   4 blaggacao blaggacao  4096 Dec 13 19:12 signer/
-rw-r--r--   1 blaggacao blaggacao  1337 Dec 13 19:12 utils.py
drwxr-xr-x   4 blaggacao blaggacao  4096 Dec 13 19:12 validator/
blaggacao commented 5 years ago

There is another one, the DIAN_UBL.xsd is not included, I guess I've seen how to do that today.:

OSError: OSError('Error reading file \'/usr/local/lib/python3.5/dist-packages/facturark/XSD/DIAN/DIAN_UBL.xsd\': failed to load external entity "/usr/local/lib/python3.5/dist-packages/facturark/XSD/DIAN/DIAN_UBL.xsd"',)
tebanep commented 5 years ago

@blaggacao to be completely honest, our deployment method right now for Odoo is just embedding the whole library in an Odoo module, wrapping it in an abstract model :/ We are planning to release facturark to pypi when the api and documentation reach a higher stability. Fully agree that this is something we should work on.

blaggacao commented 5 years ago

Fixed by #22

yaazkal commented 2 years ago

Hi. Curious about this python library and its Odoo usage. Is there any public repo for an odoo addon to look at it?

tebanep commented 2 years ago

Unfortunately, development in this library has been suspended, @yaazkal. You should look for an electronic service provider for the countries your interested in and connect to them via their exposed API. Thank you for your interest in this project!

yaazkal commented 2 years ago

@tebanep thanks for the answer, so sorry to hear the development is stopped.