diff --git a/codechecker.spec b/codechecker.spec index bf4913a3997..6882e12ee42 100644 --- a/codechecker.spec +++ b/codechecker.spec @@ -1,8 +1,8 @@ ### RPM external codechecker 0.1 ## INITENV +PATH LD_LIBRARY_PATH %i/lib64 -%define tag f10d1156e2295d688d6b0a80fae50df029caa1fd -%define branch llvm9 +%define tag d0f091c40569bf5b618f3e415a9b07fa6d9044fc +%define branch llvm10 %define github_user cms-externals Source: git+https://github.com/%github_user/CMSCodeChecker.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz diff --git a/llvm.spec b/llvm.spec index 9c0072908c3..7c9875298db 100644 --- a/llvm.spec +++ b/llvm.spec @@ -1,4 +1,4 @@ -### RPM external llvm 9.0.1 +### RPM external llvm 10.0.0 ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64 ## INITENV +PATH PYTHON27PATH %{i}/lib64/python`echo $PYTHON_VERSION | cut -d. -f 1,2`/site-packages ## INITENV +PATH PYTHON3PATH %{i}/lib64/python`echo $PYTHON3_VERSION | cut -d. -f 1,2`/site-packages @@ -8,10 +8,10 @@ Requires: gcc zlib python python3 Requires: cuda AutoReq: no -%define llvmCommit 379a43bc841451feccf78db64f2ed5c9e62c7de8 -%define llvmBranch cms/release/9.x/c1a0a21 -%define iwyuCommit 06e88efada2ff6dbccee3bbb1279c10439daa4d2 -%define iwyuBranch clang_9.0 +%define llvmCommit 80c6853a9ea2d6b142111a4177f94fb8b39ba2cf +%define llvmBranch cms/release/10.x/92d5c1b +%define iwyuCommit a5a6f27dabeb7fbc59b06ea949a312201c2fbdcf +%define iwyuBranch master Source0: git+https://github.com/cms-externals/llvm-project.git?obj=%{llvmBranch}/%{llvmCommit}&export=llvm-%{realversion}-%{llvmCommit}&module=llvm-%{realversion}-%{llvmCommit}&output=/llvm-%{realversion}-%{llvmCommit}.tgz Source1: git+https://github.com/include-what-you-use/include-what-you-use.git?obj=%{iwyuBranch}/%{iwyuCommit}&export=iwyu-%{realversion}-%{iwyuCommit}&module=iwyu-%{realversion}-%{iwyuCommit}&output=/iwyu-%{realversion}-%{iwyuCommit}.tgz diff --git a/pip/llvmlite.file b/pip/llvmlite.file index 673eb26e96f..496f3123ec4 100644 --- a/pip/llvmlite.file +++ b/pip/llvmlite.file @@ -2,5 +2,5 @@ Requires: llvm py2-wheel py2-enum34 Patch0: py2-llvmlite-fpic-flag Patch1: py2-llvmlite-llvm9 -%define source0 git+https://github.com/numba/llvmlite?obj=master/6435ea21f73dbf909a0418ed16375361e40d9892&export=llvmlite-%{realversion}&output=/source.tar.gz +%define source0 git+https://github.com/numba/llvmlite?obj=master/0be433f000ddad39a43a7469ce19e0692a8b73de&export=llvmlite-%{realversion}&output=/source.tar.gz %define PipPreBuild export LLVM_CONFIG=${LLVM_ROOT}/bin/llvm-config diff --git a/pip/numba.file b/pip/numba.file deleted file mode 100644 index dae9fd941bb..00000000000 --- a/pip/numba.file +++ /dev/null @@ -1,3 +0,0 @@ -Requires: py2-funcsigs py2-six py2-singledispatch py2-llvmlite py2-numpy py3-numpy -%define source0 git+https://github.com/numba/numba?obj=master/2da803c60bd484012fce92bbdf31f4335501ec95&export=numba-%{realversion}&output=/source.tar.gz -%define RelocatePython %{i}/bin/* diff --git a/pip/oamap.file b/pip/oamap.file deleted file mode 100644 index 9b999941c35..00000000000 --- a/pip/oamap.file +++ /dev/null @@ -1,2 +0,0 @@ -Requires: py2-numpy py2-numba py2-uproot py2-h5py py3-numpy -Patch0: py2-oamap-Const2Literal diff --git a/pip/py3-numba.file b/pip/py3-numba.file new file mode 100644 index 00000000000..16a55123de7 --- /dev/null +++ b/pip/py3-numba.file @@ -0,0 +1,5 @@ +Requires: py2-funcsigs py2-six py2-singledispatch py2-llvmlite py3-numpy python3 +Patch0: py3-numba-llvm33 + +%define source0 git+https://github.com/numba/numba?obj=master/1ea770564cb3c0c6cb9d8ab92e7faf23cd4c4c19&export=numba-%{realversion}&output=/source.tar.gz +%define RelocatePython %{i}/bin/* diff --git a/pip/requirements.txt b/pip/requirements.txt index 2af8221150b..4b211adeacc 100644 --- a/pip/requirements.txt +++ b/pip/requirements.txt @@ -117,7 +117,7 @@ kiwisolver==1.1.0 lazy-object-proxy==1.4.3 lizard==1.17.3 #NO_AUTO_UPDATE: Source is defined in llvmlite.file, changing version here is not going to get new sources -llvmlite==0.32.0x +llvmlite==0.33.0dev lxml==4.5.0 lz4==2.2.1 Mako==1.1.2 @@ -142,14 +142,13 @@ nose-parameterized==0.6.0 nose==1.3.7 notebook==5.7.8 ; python_version<'3.0' notebook==6.0.2 ; python_version>'3.0' -numba==0.47.0 +numba==0.50.0dev0 ; python_version>'3.0' numexpr==2.7.1 numpy==1.16.6 ; python_version<'3.0' numpy==1.17.5 ; python_version>'3.0' #NO_AUTO_UPDATE:2: numpy versions >1.15.1 fail on aarch64 numpy==1.15.1 ; python_version<'3.0' ; platform_machine=='aarch64' numpy==1.15.1 ; python_version>'3.0' ; platform_machine=='aarch64' -oamap==0.12.4 onnx==1.6.0 onnxruntime==1.2.0 ; python_version>'3.0' opt-einsum==2.3.2 ; python_version<'3.0' diff --git a/py2-dxr-llvm10.patch b/py2-dxr-llvm10.patch new file mode 100644 index 00000000000..4b7037d4423 --- /dev/null +++ b/py2-dxr-llvm10.patch @@ -0,0 +1,48 @@ +diff --git a/dxr/plugins/clang/dxr-index.cpp b/dxr/plugins/clang/dxr-index.cpp +index bba5563..bd95878 100644 +--- a/dxr/plugins/clang/dxr-index.cpp ++++ b/dxr/plugins/clang/dxr-index.cpp +@@ -3,6 +3,7 @@ + #include "clang/AST/RecursiveASTVisitor.h" + #include "clang/Basic/SourceManager.h" + #include "clang/Basic/Version.h" ++#include "clang/Basic/FileManager.h" + #include "clang/Frontend/CompilerInstance.h" + #include "clang/Frontend/FrontendPluginRegistry.h" + #include "clang/Lex/Lexer.h" +@@ -158,7 +159,7 @@ public: + m_currentFunction(NULL) { + inner = ci.getDiagnostics().takeClient(); + ci.getDiagnostics().setClient(this, false); +- ci.getPreprocessor().addPPCallbacks(llvm::make_unique(this)); ++ ci.getPreprocessor().addPPCallbacks(std::make_unique(this)); + } + + virtual DiagnosticConsumer *clone(DiagnosticsEngine &Diags) const { +@@ -390,7 +391,7 @@ public: + recordValue("name", nd->getNameAsString()); + recordValue("qualname", getQualifiedName(*nd)); + recordValue("loc", locationToString(d->getLocation())); +- recordValue("kind", d->getKindName()); ++ recordValue("kind", d->getKindName().str()); + printScope(d); + // Linkify the name, not the `enum' + printExtent(nd->getLocation(), nd->getLocation()); +@@ -1070,7 +1071,7 @@ public: + // you include a nonexistent file. + !file || + +- !(target = getFileInfo(file->getName()))->interesting || ++ !(target = getFileInfo(file->getName().str()))->interesting || + + // TODO: Come up with some kind of reasonable extent for macro-based + // includes, like #include FOO_MACRO. +@@ -1151,7 +1152,7 @@ void PreprocThunk::InclusionDirective( // same in 3.2 and 3.3 + class DXRIndexAction : public PluginASTAction { + protected: + std::unique_ptr CreateASTConsumer(CompilerInstance &CI, llvm::StringRef f) { +- return llvm::make_unique(CI); ++ return std::make_unique(CI); + } + + bool ParseArgs(const CompilerInstance &CI, diff --git a/py2-dxr.spec b/py2-dxr.spec index 097f8200170..b4699eb3e2d 100644 --- a/py2-dxr.spec +++ b/py2-dxr.spec @@ -19,6 +19,7 @@ Patch5: py2-dxr-clang37 Patch6: py2-dxr-clang700 Patch7: py2-dxr-llvm801 Patch8: py2-dxr-dxrindex-fpic +Patch9: py2-dxr-llvm10 %define keep_archives true %prep @@ -35,6 +36,7 @@ cd .. %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 mv trilite-%triliteCommit/* trilite %setup -T -D -n dxr-%dxrCommit diff --git a/py2-llvmlite-llvm9.patch b/py2-llvmlite-llvm9.patch index 641b567a162..c77f99cdab7 100644 --- a/py2-llvmlite-llvm9.patch +++ b/py2-llvmlite-llvm9.patch @@ -6,7 +6,20 @@ diff -Naur a/ffi/build.py b/ffi/build.py print(out) if not (out.startswith('8.0.') or out.startswith('7.0.') - or out.startswith('7.1.')): -+ or out.startswith('7.1.') or out.startswith('9.0.')): ++ or out.startswith('7.1.') or out.startswith('9.0.') or out.startswith('10.0.')): msg = ( "Building llvmlite requires LLVM 7.0.x, 7.1.x or 8.0.x Be sure to " "set LLVM_CONFIG to the right executable path.\n" +diff --git a/ffi/linker.cpp b/ffi/linker.cpp +index 57bb80b..2cc0019 100644 +--- a/ffi/linker.cpp ++++ b/ffi/linker.cpp +@@ -42,7 +42,7 @@ LLVMPY_LinkModules(LLVMModuleRef Dest, LLVMModuleRef Src, const char **Err) + auto OldDiagnosticHandler = Ctx.getDiagnosticHandler(); + + // set the handler to a new one +- Ctx.setDiagnosticHandler(llvm::make_unique(errstream)); ++ Ctx.setDiagnosticHandler(std::make_unique(errstream)); + + // link + bool failed = LLVMLinkModules2(Dest, Src); diff --git a/py2-oamap-Const2Literal.patch b/py2-oamap-Const2Literal.patch deleted file mode 100644 index b09eab3a424..00000000000 --- a/py2-oamap-Const2Literal.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/oamap/compiler.py b/oamap/compiler.py -index f45e42a..04073b4 100644 ---- a/oamap/compiler.py -+++ b/oamap/compiler.py -@@ -294,7 +294,7 @@ else: - else: - raise IndexError("item {0} out of range for type {1}".format(idx, tpe.schema)) - -- @numba.extending.lower_builtin("static_getitem", SchemaType, numba.types.Const) -+ @numba.extending.lower_builtin("static_getitem", SchemaType, numba.types.Literal) - def schema_static_getitem(context, builder, sig, args): - typ, _ = sig.args - return numba.cgutils.create_struct_proxy(typ)(context, builder)._getvalue() -@@ -1415,7 +1415,7 @@ else: - else: - raise IndexError("item {0} out of range for type {1}".format(idx, tpe.generator.schema)) - -- @numba.extending.lower_builtin("static_getitem", TupleProxyNumbaType, numba.types.Const) -+ @numba.extending.lower_builtin("static_getitem", TupleProxyNumbaType, numba.types.Literal) - def tupleproxy_static_getitem(context, builder, sig, args): - tupletpe, _ = sig.args - tupleval, idx = args diff --git a/py3-numba-llvm33.patch b/py3-numba-llvm33.patch new file mode 100644 index 00000000000..5882ed053e5 --- /dev/null +++ b/py3-numba-llvm33.patch @@ -0,0 +1,28 @@ +diff --git a/setup.py b/setup.py +index d9af186..edfdd3c 100644 +--- a/setup.py ++++ b/setup.py +@@ -302,12 +302,8 @@ def get_ext_modules(): + + packages = find_packages(include=["numba", "numba.*"]) + +-build_requires = [f'numpy >={min_numpy_build_version}'] +-install_requires = [ +- f'llvmlite >={min_llvmlite_version},<={max_llvmlite_version}', +- f'numpy >={min_numpy_run_version}', +- 'setuptools', +-] ++build_requires = ['numpy >=1.11'] ++install_requires = ['llvmlite>=0.31.0dev0,<=0.33.0.dev0', 'numpy', 'setuptools'] + + metadata = dict( + name='numba', +@@ -346,7 +342,7 @@ metadata = dict( + packages=packages, + setup_requires=build_requires, + install_requires=install_requires, +- python_requires=f">={min_python_version}", ++ python_requires=">=3.6", + license="BSD", + cmdclass=cmdclass, + ) diff --git a/python_tools.spec b/python_tools.spec index 1e92ed59e2a..14f686c6a90 100644 --- a/python_tools.spec +++ b/python_tools.spec @@ -24,7 +24,7 @@ Requires: py2-downhill Requires: py2-theanets Requires: py2-xgboost Requires: py2-llvmlite -Requires: py2-numba +Requires: py3-numba Requires: py2-hep_ml Requires: py2-rep Requires: py2-uncertainties @@ -35,7 +35,6 @@ Requires: py2-h5py Requires: py2-h5py-cache Requires: py2-root_pandas Requires: py2-uproot -Requires: py2-oamap #this DOES NOT depend on numpy.. Requires: py2-xrootdpyfs