[REF]Hy Odoo : huge refactoring for real imports / requires
This commit is contained in:
parent
5e56a16aa3
commit
52ed13524b
@ -16,4 +16,3 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import hy
|
||||
from . import odoo, xml_base, utils
|
||||
|
@ -1,18 +0,0 @@
|
||||
;; -*- coding: utf-8 -*-
|
||||
;;
|
||||
;; Copyright 2021 Fabien Bourgeois <fabien@yaltik.com>
|
||||
;;
|
||||
;; This program is free software: you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU Affero General Public License as
|
||||
;; published by the Free Software Foundation, either version 3 of the
|
||||
;; License, or (at your option) any later version.
|
||||
;;
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU Affero General Public License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU Affero General Public License
|
||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
; (require [hy-odoo.macros [general odoo test]])
|
@ -18,7 +18,7 @@
|
||||
" Odoo macros and helpers "
|
||||
|
||||
(import os [path]
|
||||
hy-odoo.xml_base [xmlroot xmln])
|
||||
hy-odoo.xml [xmlroot xmln])
|
||||
|
||||
; Global helpers
|
||||
|
||||
|
@ -19,13 +19,13 @@
|
||||
|
||||
(require
|
||||
hyrule.control [defmain]
|
||||
hy-odoo.macros.test *)
|
||||
hy-odoo.mtest *)
|
||||
|
||||
(import unittest
|
||||
functools [partial]
|
||||
xml.etree.ElementTree :as ET
|
||||
os [unlink]
|
||||
hy-odoo.xml-base [XMLDictElement xmln xmlroot xmlchild xml-write])
|
||||
hy-odoo.xml [XMLDictElement xmln xmlroot xmlchild xml-write])
|
||||
|
||||
(defclass TextXMLBase [(. unittest TestCase)]
|
||||
"XML Helpers tests"
|
||||
|
@ -17,8 +17,8 @@
|
||||
|
||||
" XML helpers and macros "
|
||||
|
||||
(require hy-odoo.macros.general [instance?]
|
||||
hy-odoo.macros.odoo [pdb])
|
||||
(require hy-odoo.mgeneral [instance?]
|
||||
hy-odoo.modoo [pdb])
|
||||
(import collections [namedtuple]
|
||||
functools [partial]
|
||||
os [path]
|
20
setup.py
20
setup.py
@ -1,4 +1,20 @@
|
||||
from setuptools import setup, find_packages
|
||||
from setuptools.command.install import install
|
||||
|
||||
class install(install):
|
||||
""" From hyrule, thanks """
|
||||
def run(self):
|
||||
super().run()
|
||||
import py_compile
|
||||
|
||||
import hy # for compile hooks
|
||||
|
||||
for path in set(self.get_outputs()):
|
||||
if path.endswith(".hy"):
|
||||
py_compile.compile(
|
||||
path,
|
||||
invalidation_mode=py_compile.PycInvalidationMode.CHECKED_HASH,
|
||||
)
|
||||
|
||||
setup(
|
||||
name="hy_odoo",
|
||||
@ -7,6 +23,7 @@ setup(
|
||||
package_data={
|
||||
'hy_odoo': ['*.hy'],
|
||||
},
|
||||
setup_requires=["hy==0.24.*", "hyrule==0.2.*"],
|
||||
install_requires=["hy==0.24.*", "hyrule==0.2.*"],
|
||||
author="Fabien Bourgeois",
|
||||
author_email="fabien@yaltik.com",
|
||||
@ -23,5 +40,6 @@ setup(
|
||||
'Programming Language :: Python :: 3.9',
|
||||
'Programming Language :: Python :: 3.10',
|
||||
'Programming Language :: Python :: 3.11',
|
||||
]
|
||||
],
|
||||
cmdclass={'install': install}
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user