[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/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import hy
|
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 "
|
" Odoo macros and helpers "
|
||||||
|
|
||||||
(import os [path]
|
(import os [path]
|
||||||
hy-odoo.xml_base [xmlroot xmln])
|
hy-odoo.xml [xmlroot xmln])
|
||||||
|
|
||||||
; Global helpers
|
; Global helpers
|
||||||
|
|
||||||
|
@ -19,13 +19,13 @@
|
|||||||
|
|
||||||
(require
|
(require
|
||||||
hyrule.control [defmain]
|
hyrule.control [defmain]
|
||||||
hy-odoo.macros.test *)
|
hy-odoo.mtest *)
|
||||||
|
|
||||||
(import unittest
|
(import unittest
|
||||||
functools [partial]
|
functools [partial]
|
||||||
xml.etree.ElementTree :as ET
|
xml.etree.ElementTree :as ET
|
||||||
os [unlink]
|
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)]
|
(defclass TextXMLBase [(. unittest TestCase)]
|
||||||
"XML Helpers tests"
|
"XML Helpers tests"
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
" XML helpers and macros "
|
" XML helpers and macros "
|
||||||
|
|
||||||
(require hy-odoo.macros.general [instance?]
|
(require hy-odoo.mgeneral [instance?]
|
||||||
hy-odoo.macros.odoo [pdb])
|
hy-odoo.modoo [pdb])
|
||||||
(import collections [namedtuple]
|
(import collections [namedtuple]
|
||||||
functools [partial]
|
functools [partial]
|
||||||
os [path]
|
os [path]
|
20
setup.py
20
setup.py
@ -1,4 +1,20 @@
|
|||||||
from setuptools import setup, find_packages
|
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(
|
setup(
|
||||||
name="hy_odoo",
|
name="hy_odoo",
|
||||||
@ -7,6 +23,7 @@ setup(
|
|||||||
package_data={
|
package_data={
|
||||||
'hy_odoo': ['*.hy'],
|
'hy_odoo': ['*.hy'],
|
||||||
},
|
},
|
||||||
|
setup_requires=["hy==0.24.*", "hyrule==0.2.*"],
|
||||||
install_requires=["hy==0.24.*", "hyrule==0.2.*"],
|
install_requires=["hy==0.24.*", "hyrule==0.2.*"],
|
||||||
author="Fabien Bourgeois",
|
author="Fabien Bourgeois",
|
||||||
author_email="fabien@yaltik.com",
|
author_email="fabien@yaltik.com",
|
||||||
@ -23,5 +40,6 @@ setup(
|
|||||||
'Programming Language :: Python :: 3.9',
|
'Programming Language :: Python :: 3.9',
|
||||||
'Programming Language :: Python :: 3.10',
|
'Programming Language :: Python :: 3.10',
|
||||||
'Programming Language :: Python :: 3.11',
|
'Programming Language :: Python :: 3.11',
|
||||||
]
|
],
|
||||||
|
cmdclass={'install': install}
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user