1- from setuptools import setup , find_packages , Command
1+ from setuptools import setup , find_packages , Command , find_namespace_packages
22from setuptools .command .sdist import sdist
33from setuptools .command .build_py import build_py
44from setuptools .command .egg_info import egg_info
55from subprocess import check_call
66import os
77import sys
88import platform
9+ from glob import glob
910from os .path import (
1011 join , dirname , abspath , exists
1112)
@@ -68,8 +69,8 @@ class NPM(Command):
6869 node_modules = join (node_root , 'node_modules' )
6970
7071 targets = [
71- join (here , 'qgrid ' , 'static ' , 'extension.js' ),
72- join (here , 'qgrid ' , 'static ' , 'index.js' )
72+ join (here , 'js ' , 'static_nb ' , 'extension.js' ),
73+ join (here , 'js ' , 'static_nb ' , 'index.js' )
7374 ]
7475
7576 def initialize_options (self ):
@@ -122,31 +123,27 @@ def read_requirements(basename):
122123 with open (reqs_file ) as f :
123124 return [req .strip () for req in f .readlines ()]
124125
125- def package_files (directory ):
126- paths = []
127- for (path , directories , filenames ) in os .walk (directory ):
128- for filename in filenames :
129- paths .append (os .path .join (path , filename ))
130- return paths
131-
132126setup_args = {
133127 'name' : 'qgridnext' ,
134128 'version' : version_ns ['__version__' ],
135129 'description' : 'An Interactive Grid for Sorting and Filtering DataFrames in Jupyter' ,
136130 'long_description' : LONG_DESCRIPTION ,
137131 'include_package_data' : True ,
138132 'data_files' : [
139- ('share/jupyter/nbextensions/qgrid' , package_files ('qgrid/static' )),
133+ ('etc/jupyter/nbconfig/notebook.d' , ['qgridnext.json' ]),
134+ ('share/jupyter/nbextensions/qgridnext' , glob ('js/static_nb/*.*' )),
135+ ('share/jupyter/labextensions/qgridnext' , glob ('js/static/*.*' ) + ['install.json' ]),
136+ ('share/jupyter/labextensions/qgridnext/static' , glob ('js/static/static/*.*' ))
140137 ],
141- "python_requires" : ">=3.6 " ,
138+ "python_requires" : ">=3.7 " ,
142139 'install_requires' : read_requirements ('requirements.txt' ),
143140 'extras_require' : {
144141 "test" : [
145142 "pytest>=2.8.5" ,
146143 "flake8>=3.6.0"
147144 ],
148145 },
149- 'packages' : find_packages (exclude = [ 'qgrid.static' ] ),
146+ 'packages' : find_packages (),
150147 'zip_safe' : False ,
151148 'cmdclass' : {
152149 'build_py' : js_prerelease (build_py ),
@@ -157,7 +154,7 @@ def package_files(directory):
157154
158155 'author' : 'Quantopian Inc.' ,
159156 'author_email' :
'[email protected] ' ,
160- 'url' : 'https://github.com/quantopian/qgrid ' ,
157+ 'url' : 'https://github.com/zhihanyue/qgridnext ' ,
161158 'license' : 'Apache-2.0' ,
162159 'keywords' : [
163160 'ipython' ,
@@ -173,7 +170,6 @@ def package_files(directory):
173170 'Topic :: Scientific/Engineering :: Information Analysis' ,
174171 'Topic :: Multimedia :: Graphics' ,
175172 'Programming Language :: Python :: 3' ,
176- 'Programming Language :: Python :: 3.6' ,
177173 'Programming Language :: Python :: 3.7' ,
178174 'Programming Language :: Python :: 3.8' ,
179175 'Programming Language :: Python :: 3.9' ,
0 commit comments