2525# built by setuptools, it will be incorrectly treated as a purelib. The
2626# following works around that bug.
2727class _InstallPlatlib (install ):
28-
29- def finalize_options (self ):
30- install .finalize_options (self )
31- self .install_lib = self .install_platlib
28+ def finalize_options (self ):
29+ install .finalize_options (self )
30+ self .install_lib = self .install_platlib
3231
3332
3433class BinaryDistribution (Distribution ):
35- """This class is needed in order to create OS specific wheels."""
34+ """This class is needed in order to create OS specific wheels."""
3635
37- def is_pure (self ):
38- return False
36+ def is_pure (self ):
37+ return False
3938
40- def has_ext_modules (self ):
41- return True
39+ def has_ext_modules (self ):
40+ return True
4241
4342
4443def select_constraint (default , nightly = None , git_master = None ):
45- """Select dependency constraint based on TFX_DEPENDENCY_SELECTOR env var."""
46- selector = os .environ .get (' TFX_DEPENDENCY_SELECTOR' )
47- if selector == ' UNCONSTRAINED' :
48- return ''
49- if selector == ' NIGHTLY' and nightly is not None :
50- return nightly
51- if selector == ' GIT_MASTER' and git_master is not None :
52- return git_master
53- return default
44+ """Select dependency constraint based on TFX_DEPENDENCY_SELECTOR env var."""
45+ selector = os .environ .get (" TFX_DEPENDENCY_SELECTOR" )
46+ if selector == " UNCONSTRAINED" :
47+ return ""
48+ if selector == " NIGHTLY" and nightly is not None :
49+ return nightly
50+ if selector == " GIT_MASTER" and git_master is not None :
51+ return git_master
52+ return default
5453
5554
5655# Get the long description from the README file.
57- with open (' README.md' ) as fp :
58- _LONG_DESCRIPTION = fp .read ()
56+ with open (" README.md" ) as fp :
57+ _LONG_DESCRIPTION = fp .read ()
5958
60- with open (' struct2tensor/version.py' ) as fp :
61- globals_dict = {}
62- exec (fp .read (), globals_dict ) # pylint: disable=exec-used
63- __version__ = globals_dict [' __version__' ]
59+ with open (" struct2tensor/version.py" ) as fp :
60+ globals_dict = {}
61+ exec (fp .read (), globals_dict ) # pylint: disable=exec-used
62+ __version__ = globals_dict [" __version__" ]
6463
6564setup (
66- name = ' struct2tensor' ,
65+ name = " struct2tensor" ,
6766 version = __version__ ,
6867 description = (
69- ' Struct2Tensor is a package for parsing and manipulating'
70- ' structured data for TensorFlow'
68+ " Struct2Tensor is a package for parsing and manipulating"
69+ " structured data for TensorFlow"
7170 ),
72- author = ' Google LLC' ,
73- 71+ author = " Google LLC" ,
72+ 7473 # Contained modules and scripts.
7574 packages = find_packages (),
7675 install_requires = [
7776 # TODO(b/263060885): Remove the explicit numpy dependency once TF works
7877 # with numpy>=1.24.
79- ' numpy>=1.22' ,
78+ " numpy>=1.22" ,
8079 'protobuf>=4.25.2,<6.0.0;python_version>="3.11"' ,
8180 'protobuf>=4.21.6,<6.0.0;python_version<"3.11"' ,
82- ' tensorflow>=2.17,<2.18' ,
83- ' tensorflow-metadata'
81+ " tensorflow>=2.17,<2.18" ,
82+ " tensorflow-metadata"
8483 + select_constraint (
85- default = ' >=1.17.0,<1.18.0' ,
86- nightly = ' >=1.18.0.dev' ,
87- git_master = ' @git+https://github.com/tensorflow/metadata@master' ,
84+ default = " >=1.17.0,<1.18.0" ,
85+ nightly = " >=1.18.0.dev" ,
86+ git_master = " @git+https://github.com/tensorflow/metadata@master" ,
8887 ),
89- ' pyarrow>=10,<11' ,
88+ " pyarrow>=10,<11" ,
9089 ],
9190 extras_require = {
9291 'lint' : [
@@ -95,33 +94,33 @@ def select_constraint(default, nightly=None, git_master=None):
9594 },
9695 # Add in any packaged data.
9796 include_package_data = True ,
98- package_data = {'' : [' *.lib' , ' *.so' ]},
97+ package_data = {"" : [" *.lib" , " *.so" ]},
9998 zip_safe = False ,
10099 distclass = BinaryDistribution ,
101100 # PyPI package information.
102101 classifiers = [
103- ' Development Status :: 4 - Beta' ,
104- ' Intended Audience :: Developers' ,
105- ' Intended Audience :: Education' ,
106- ' Intended Audience :: Science/Research' ,
107- ' License :: OSI Approved :: Apache Software License' ,
108- ' Operating System :: MacOS :: MacOS X' ,
109- ' Operating System :: POSIX :: Linux' ,
110- ' Programming Language :: Python' ,
111- ' Programming Language :: Python :: 3.9' ,
112- ' Programming Language :: Python :: 3.10' ,
113- ' Programming Language :: Python :: 3.11' ,
114- ' Programming Language :: Python :: 3 :: Only' ,
115- ' Topic :: Scientific/Engineering' ,
116- ' Topic :: Scientific/Engineering :: Artificial Intelligence' ,
117- ' Topic :: Scientific/Engineering :: Mathematics' ,
118- ' Topic :: Software Development' ,
119- ' Topic :: Software Development :: Libraries' ,
120- ' Topic :: Software Development :: Libraries :: Python Modules' ,
102+ " Development Status :: 4 - Beta" ,
103+ " Intended Audience :: Developers" ,
104+ " Intended Audience :: Education" ,
105+ " Intended Audience :: Science/Research" ,
106+ " License :: OSI Approved :: Apache Software License" ,
107+ " Operating System :: MacOS :: MacOS X" ,
108+ " Operating System :: POSIX :: Linux" ,
109+ " Programming Language :: Python" ,
110+ " Programming Language :: Python :: 3.9" ,
111+ " Programming Language :: Python :: 3.10" ,
112+ " Programming Language :: Python :: 3.11" ,
113+ " Programming Language :: Python :: 3 :: Only" ,
114+ " Topic :: Scientific/Engineering" ,
115+ " Topic :: Scientific/Engineering :: Artificial Intelligence" ,
116+ " Topic :: Scientific/Engineering :: Mathematics" ,
117+ " Topic :: Software Development" ,
118+ " Topic :: Software Development :: Libraries" ,
119+ " Topic :: Software Development :: Libraries :: Python Modules" ,
121120 ],
122- license = ' Apache 2.0' ,
123- keywords = ' tensorflow protobuf machine learning' ,
121+ license = " Apache 2.0" ,
122+ keywords = " tensorflow protobuf machine learning" ,
124123 long_description = _LONG_DESCRIPTION ,
125- long_description_content_type = ' text/markdown' ,
126- cmdclass = {' install' : _InstallPlatlib },
124+ long_description_content_type = " text/markdown" ,
125+ cmdclass = {" install" : _InstallPlatlib },
127126)
0 commit comments