@@ -29,58 +29,140 @@ def parse_requirements(filename):
2929
3030test_requirements = parse_requirements ('requirements-test.txt' )
3131
32- setup (
33- name = 'cmake' ,
34-
35- version = versioneer .get_version (),
36- cmdclass = versioneer .get_cmdclass (),
37-
38- author = 'Jean-Christophe Fillion-Robin' ,
39- 40-
41- package_dir = {'' : 'src' },
42- packages = ['cmake' ],
43-
44- cmake_install_dir = 'src/cmake/data' ,
45-
46- entry_points = {
47- 'console_scripts' : [
48- 'cmake=cmake:cmake' , 'cpack=cmake:cpack' , 'ctest=cmake:ctest'
49- ]
50- },
51-
52- url = 'https://cmake.org/' ,
53- download_url = 'https://cmake.org/download' ,
54- project_urls = {
55- "Documentation" : "https://cmake-python-distributions.readthedocs.io/" ,
56- "Source Code" : "https://github.com/scikit-build/cmake-python-distributions" ,
57- "Mailing list" : "https://groups.google.com/forum/#!forum/scikit-build" ,
58- "Bug Tracker" : "https://github.com/scikit-build/cmake-python-distributions/issues" ,
59- },
60-
61-
62- description = 'CMake is an open-source, cross-platform family of '
63- 'tools designed to build, test and package software' ,
64-
65- long_description = readme + '\n \n ' + history ,
66- long_description_content_type = 'text/x-rst' ,
67-
68- classifiers = [
69- 'License :: OSI Approved :: Apache Software License' ,
70- 'License :: OSI Approved :: BSD License' ,
71- 'Programming Language :: C' ,
72- 'Programming Language :: C++' ,
73- 'Programming Language :: Fortran' ,
74- 'Programming Language :: Python' ,
75- 'Operating System :: OS Independent' ,
76- 'Development Status :: 5 - Production/Stable' ,
77- 'Intended Audience :: Developers' ,
78- 'Topic :: Software Development :: Build Tools'
79- ],
80-
81- license = 'Apache 2.0' ,
82-
83- keywords = 'CMake build c++ fortran cross-platform cross-compilation' ,
84-
85- extras_require = {"test" : test_requirements },
86- )
32+ try :
33+ setup (
34+ name = 'cmake' ,
35+
36+ version = versioneer .get_version (),
37+ cmdclass = versioneer .get_cmdclass (),
38+
39+ author = 'Jean-Christophe Fillion-Robin' ,
40+ 41+
42+ package_dir = {'' : 'src' },
43+ packages = ['cmake' ],
44+
45+ cmake_install_dir = 'src/cmake/data' ,
46+
47+ entry_points = {
48+ 'console_scripts' : [
49+ 'cmake=cmake:cmake' , 'cpack=cmake:cpack' , 'ctest=cmake:ctest'
50+ ]
51+ },
52+
53+ url = 'https://cmake.org/' ,
54+ download_url = 'https://cmake.org/download' ,
55+ project_urls = {
56+ "Documentation" : "https://cmake-python-distributions.readthedocs.io/" ,
57+ "Source Code" : "https://github.com/scikit-build/cmake-python-distributions" ,
58+ "Mailing list" : "https://groups.google.com/forum/#!forum/scikit-build" ,
59+ "Bug Tracker" : "https://github.com/scikit-build/cmake-python-distributions/issues" ,
60+ },
61+
62+
63+ description = 'CMake is an open-source, cross-platform family of '
64+ 'tools designed to build, test and package software' ,
65+
66+ long_description = readme + '\n \n ' + history ,
67+ long_description_content_type = 'text/x-rst' ,
68+
69+ classifiers = [
70+ 'License :: OSI Approved :: Apache Software License' ,
71+ 'License :: OSI Approved :: BSD License' ,
72+ 'Programming Language :: C' ,
73+ 'Programming Language :: C++' ,
74+ 'Programming Language :: Fortran' ,
75+ 'Programming Language :: Python' ,
76+ 'Operating System :: OS Independent' ,
77+ 'Development Status :: 5 - Production/Stable' ,
78+ 'Intended Audience :: Developers' ,
79+ 'Topic :: Software Development :: Build Tools'
80+ ],
81+
82+ license = 'Apache 2.0' ,
83+
84+ keywords = 'CMake build c++ fortran cross-platform cross-compilation' ,
85+
86+ extras_require = {"test" : test_requirements },
87+ )
88+ except :
89+ # Note: This is a bare exception that re-raises so that we don't interfere
90+ # with anything the installation machinery might want to do. Because we
91+ # print this for any exception this msg can appear (e.g. in verbose logs)
92+ # even if there's no failure. For example, SetupRequirementsError is raised
93+ # during PEP517 building and prints this text. setuptools raises SystemExit
94+ # when compilation fails right now, but it's possible this isn't stable
95+ # or a public API commitment so we'll remain ultra conservative.
96+ import platform
97+ try :
98+ import pkg_resources
99+ except ImportError :
100+ pass
101+
102+ print (
103+ """
104+ =============================DEBUG ASSISTANCE=============================
105+ If you are seeing a compilation error please try the following steps to
106+ successfully install cryptography:
107+ 1) Upgrade to the latest pip and try again. This will fix errors for most
108+ users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
109+ 2) If on Linux, with glibc < 2.12, you can set PIP_ONLY_BINARY=cmake in
110+ order to retrieve the last manylinux1 compatible wheel.
111+ 3) If on Linux, with glibc < 2.12, you can cap "cmake<3.23" in your
112+ requirements in order to retrieve the last manylinux1 compatible wheel.
113+ 4) Open an issue with the debug information that follows at
114+ https://github.com/scikit-build/cmake-python-distributions/issues
115+ """
116+ )
117+ print (" Python: %s" % '.' .join (str (v ) for v in sys .version_info [:3 ]))
118+ print (" platform: %s" % platform .platform ())
119+ if sys .platform .startswith ("linux" ):
120+ try :
121+ print (" glibc: %s" % os .confstr ("CS_GNU_LIBC_VERSION" ))
122+ except :
123+ try :
124+ import ctypes
125+ process_namespace = ctypes .CDLL (None )
126+ gnu_get_libc_version = process_namespace .gnu_get_libc_version
127+ gnu_get_libc_version .restype = ctypes .c_char_p
128+ glibc_version = gnu_get_libc_version ()
129+ if not isinstance (glibc_version , str ):
130+ glibc_version = glibc_version .decode ("ascii" )
131+ print (" glibc: %s" % glibc_version )
132+ except :
133+ pass
134+ if sys .platform .startswith ("darwin" ):
135+ try :
136+ macos_ver = subprocess .check_output (
137+ [
138+ sys .executable ,
139+ "-sS" ,
140+ "-c" ,
141+ "import platform; print(platform.mac_ver()[0])" ,
142+ ],
143+ universal_newlines = True ,
144+ env = {"SYSTEM_VERSION_COMPAT" : "0" },
145+ ).strip ()
146+ print (" macos: %s" % macos_ver )
147+ except :
148+ try :
149+ print (" macos: %s" % platform .mac_ver ()[0 ])
150+ except :
151+ pass
152+ print (" machine: %s" % platform .machine ())
153+ print (" bits: %d" % (64 if sys .maxsize > 2 ** 32 else 32 ))
154+ for dist in ["pip" , "setuptools" , "scikit-build" ]:
155+ try :
156+ version = pkg_resources .get_distribution (dist ).version
157+ except pkg_resources .DistributionNotFound :
158+ version = "n/a"
159+ print (" %s: %s" % (dist , version ))
160+ for key in ["PEP517_BUILD_BACKEND" ]:
161+ if key in os .environ :
162+ print (" %s=%s" % (key , os .environ [key ]))
163+ print (
164+ """\
165+ =============================DEBUG ASSISTANCE=============================
166+ """
167+ )
168+ raise
0 commit comments