File tree Expand file tree Collapse file tree 1 file changed +14
-12
lines changed
Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change 11import setuptools
2- from setuptools .command . install import install
2+ from distutils .command import build as build_module
33
44about = {}
55with open ("mindsdb_sql_parser/__about__.py" ) as fp :
66 exec (fp .read (), about )
77
8- class PostInstallCommand (install ):
9- """Post-installation for installation mode."""
10- def run (self ):
11- install .run (self )
12- from mindsdb_sql_parser .parser import MindsDBParser
13- try :
14- MindsDBParser .build_to_file ()
15- except Exception as e :
16- print (f'Problem with building syntax. Import might be not efficient: { e } ' )
8+ class Build (build_module .build ):
9+ def run (self ):
10+ from mindsdb_sql_parser .parser import MindsDBParser
11+ try :
12+ MindsDBParser .build_to_file ()
13+ except Exception as e :
14+ print (f'Problem with building syntax. Import might be not efficient: { e } ' )
15+ build_module .build .run (self )
1716
1817setuptools .setup (
1918 name = about ['__title__' ],
@@ -25,12 +24,15 @@ def run(self):
2524 author_email = about ['__email__' ],
2625 description = about ['__description__' ],
2726 packages = setuptools .find_packages (exclude = ('tests*' ,)),
27+ package_data = {
28+ about ['__title__' ]: ['*.json' ], # Adjust the path as needed
29+ },
2830 classifiers = [
2931 "Programming Language :: Python :: 3" ,
3032 "Operating System :: OS Independent" ,
3133 ],
3234 python_requires = ">=3.6" ,
3335 cmdclass = {
34- 'install ' : PostInstallCommand ,
35- }
36+ 'sdist ' : Build
37+ },
3638)
You can’t perform that action at this time.
0 commit comments