Conversation
ccf7922 to
72ba5ad
Compare
4ffd39f to
8f7f837
Compare
tgamblin
left a comment
There was a problem hiding this comment.
I reviewed this commit by commit on the CLI. The changes are mostly mechanical (via spack repo migrate with additions to fix coupling between core and packages, mostly to handle name changes in tests.
Follow-ons:
-
Should remove the now-unused
spack.paths.build_systems_path -
(for me) Should add some proper fix for the windows grep issue (see #50520)
-
Not clear to me why we use relative imports in
builtinand absolute inbuiltin_mock -
This one might be more significant:
It's not clear to me that v1 packages that import other packages are handled by
spack repo migrate-- are they? This type of stuff looks like it was a manual change needed after migration to v2:-from ..cmake_client import CmakeClient +from ..cmake_client.package import CmakeClient
In a follow-on we should modify spack repo migrate to do this.
Otherwise looks good to me.
Because some test repos have symlinks to packages from from builtin_mock, which makes Edit: they are all absolute now.
Correct, that isn't handled. |
use absolute imports for build_systems to make copy/paste of recipes easier.
|
@spackbot run pipeline |
|
I've started that pipeline for you! |
|
Merged because pipeline failures on |
Builders and package classes refer to packages from the builtin package repo and are often modified together with packages. That means that these classes should move into `spack_repo.builtin`. * move `spack.build_systems` -> `spack_repo.builtin.build_systems` * Remove the following re-exports from the `spack.package` module: - `AspellDictPackage` - `LuaPackage` - `AutotoolsPackage` - `MakefilePackage` - `BundlePackage` - `MavenPackage` - `CachedCMakePackage` - `MesonPackage` - `cmake_cache_filepath` - `MSBuildPackage` - `cmake_cache_option` - `NMakePackage` - `cmake_cache_path` - `OctavePackage` - `cmake_cache_string` - `PerlPackage` - `CargoPackage` - `PythonExtension` - `CMakePackage` - `PythonPackage` - `generator` - `QMakePackage` - `CompilerPackage` - `RacketPackage` - `CudaPackage` - `RPackage` - `Package` - `ROCmPackage` - `GNUMirrorPackage` - `RubyPackage` - `GoPackage` - `SConsPackage` - `IntelPackage` - `SIPPackage` - `IntelOneApiLibraryPackageWithSdk` - `SourceforgePackage` - `IntelOneApiLibraryPackage` - `SourcewarePackage` - `IntelOneApiStaticLibraryList` - `WafPackage` - `IntelOneApiPackage` - `XorgPackage` - `INTEL_MATH_LIBRARIES` * update mock packages to repo v2.0 and add copies of packages/build systems they use from builtin * add missing imports to build systems in `package.py` from builtin and test repos * update various tests This PR is breaking because of removal of various names from `spack.package`, but breakage should be minimal thanks to spack#50496, which ensures the above names are always imported in repo v1 packages. Specifically this PR breaks imports like the following in `package.py` files: ```python from spack.package import Package ``` but if your repo is v1.0 (see `spack repo list`) and has the following much more common pattern: ```python from spack.package import * ``` nothing should break.
Since #50452, build systems are no longer in core and need their own imports. Specifically, in addition to: ```python from spack.package import * ``` you now also need, e.g.: ```python from spack_repo.builtin.build_systems.python import PythonPackage ``` Or similar for other build systems, or things will break. - [x] Fix `py-deprecat` package - [x] Fix `cryoef` package Signed-off-by: Todd Gamblin <[email protected]>
Since #50452, build systems are no longer in core and need their own imports. Specifically, in addition to: ```python from spack.package import * ``` you now also need, e.g.: ```python from spack_repo.builtin.build_systems.python import PythonPackage ``` Or similar for other build systems, or things will break. - [x] Fix `py-deprecat` package - [x] Fix `cryoef` package Signed-off-by: Todd Gamblin <[email protected]>
Since #50452, build systems are no longer in core and need their own imports. Specifically, in addition to: ```python from spack.package import * ``` you now also need, e.g.: ```python from spack_repo.builtin.build_systems.python import PythonPackage ``` Or similar for other build systems, or things will break. - [x] Fix `py-deprecat` package - [x] Fix `cryoef` package Signed-off-by: Todd Gamblin <[email protected]>
Since spack#50452, build systems are no longer in core and need their own imports. Specifically, in addition to: ```python from spack.package import * ``` you now also need, e.g.: ```python from spack_repo.builtin.build_systems.python import PythonPackage ``` Or similar for other build systems, or things will break. - [x] Fix `py-deprecat` package - [x] Fix `cryoef` package Signed-off-by: Todd Gamblin <[email protected]>
Builders and package classes refer to packages from the builtin package repo and are often modified together with packages. That means that these classes should move into `spack_repo.builtin`. * move `spack.build_systems` -> `spack_repo.builtin.build_systems` * Remove the following re-exports from the `spack.package` module: - `AspellDictPackage` - `LuaPackage` - `AutotoolsPackage` - `MakefilePackage` - `BundlePackage` - `MavenPackage` - `CachedCMakePackage` - `MesonPackage` - `cmake_cache_filepath` - `MSBuildPackage` - `cmake_cache_option` - `NMakePackage` - `cmake_cache_path` - `OctavePackage` - `cmake_cache_string` - `PerlPackage` - `CargoPackage` - `PythonExtension` - `CMakePackage` - `PythonPackage` - `generator` - `QMakePackage` - `CompilerPackage` - `RacketPackage` - `CudaPackage` - `RPackage` - `Package` - `ROCmPackage` - `GNUMirrorPackage` - `RubyPackage` - `GoPackage` - `SConsPackage` - `IntelPackage` - `SIPPackage` - `IntelOneApiLibraryPackageWithSdk` - `SourceforgePackage` - `IntelOneApiLibraryPackage` - `SourcewarePackage` - `IntelOneApiStaticLibraryList` - `WafPackage` - `IntelOneApiPackage` - `XorgPackage` - `INTEL_MATH_LIBRARIES` * update mock packages to repo v2.0 and add copies of packages/build systems they use from builtin * add missing imports to build systems in `package.py` from builtin and test repos * update various tests This PR is breaking because of removal of various names from `spack.package`, but breakage should be minimal thanks to spack#50496, which ensures the above names are always imported in repo v1 packages. Specifically this PR breaks imports like the following in `package.py` files: ```python from spack.package import Package ``` but if your repo is v1.0 (see `spack repo list`) and has the following much more common pattern: ```python from spack.package import * ``` nothing should break.
Since spack#50452, build systems are no longer in core and need their own imports. Specifically, in addition to: ```python from spack.package import * ``` you now also need, e.g.: ```python from spack_repo.builtin.build_systems.python import PythonPackage ``` Or similar for other build systems, or things will break. - [x] Fix `py-deprecat` package - [x] Fix `cryoef` package Signed-off-by: Todd Gamblin <[email protected]>
Builders and package classes refer to packages from the builtin package repo and are often modified together with packages. That means that these classes should move into `spack_repo.builtin`. * move `spack.build_systems` -> `spack_repo.builtin.build_systems` * Remove the following re-exports from the `spack.package` module: - `AspellDictPackage` - `LuaPackage` - `AutotoolsPackage` - `MakefilePackage` - `BundlePackage` - `MavenPackage` - `CachedCMakePackage` - `MesonPackage` - `cmake_cache_filepath` - `MSBuildPackage` - `cmake_cache_option` - `NMakePackage` - `cmake_cache_path` - `OctavePackage` - `cmake_cache_string` - `PerlPackage` - `CargoPackage` - `PythonExtension` - `CMakePackage` - `PythonPackage` - `generator` - `QMakePackage` - `CompilerPackage` - `RacketPackage` - `CudaPackage` - `RPackage` - `Package` - `ROCmPackage` - `GNUMirrorPackage` - `RubyPackage` - `GoPackage` - `SConsPackage` - `IntelPackage` - `SIPPackage` - `IntelOneApiLibraryPackageWithSdk` - `SourceforgePackage` - `IntelOneApiLibraryPackage` - `SourcewarePackage` - `IntelOneApiStaticLibraryList` - `WafPackage` - `IntelOneApiPackage` - `XorgPackage` - `INTEL_MATH_LIBRARIES` * update mock packages to repo v2.0 and add copies of packages/build systems they use from builtin * add missing imports to build systems in `package.py` from builtin and test repos * update various tests This PR is breaking because of removal of various names from `spack.package`, but breakage should be minimal thanks to spack#50496, which ensures the above names are always imported in repo v1 packages. Specifically this PR breaks imports like the following in `package.py` files: ```python from spack.package import Package ``` but if your repo is v1.0 (see `spack repo list`) and has the following much more common pattern: ```python from spack.package import * ``` nothing should break.
Since spack#50452, build systems are no longer in core and need their own imports. Specifically, in addition to: ```python from spack.package import * ``` you now also need, e.g.: ```python from spack_repo.builtin.build_systems.python import PythonPackage ``` Or similar for other build systems, or things will break. - [x] Fix `py-deprecat` package - [x] Fix `cryoef` package Signed-off-by: Todd Gamblin <[email protected]>
Builders and package classes refer to packages from the builtin package repo and are often modified together with packages. That means that these classes should move into
spack_repo.builtin.spack.build_systems->spack_repo.builtin.build_systemsspack.packagemodule:AspellDictPackage,AutotoolsPackage,BundlePackage,CachedCMakePackage,cmake_cache_filepath,cmake_cache_option,cmake_cache_path,cmake_cache_string,CargoPackage,CMakePackage,generator,CompilerPackage,CudaPackage,Package,GNUMirrorPackage,GoPackage,IntelPackage,IntelOneApiLibraryPackageWithSdk,IntelOneApiLibraryPackage,IntelOneApiStaticLibraryList,IntelOneApiPackage,INTEL_MATH_LIBRARIES,LuaPackage,MakefilePackage,MavenPackage,MesonPackage,MSBuildPackage,NMakePackage,OctavePackage,PerlPackage,PythonExtension,PythonPackage,QMakePackage,RacketPackage,RPackage,ROCmPackage,RubyPackage,SConsPackage,SIPPackage,SourceforgePackage,SourcewarePackage,WafPackage,XorgPackage.package.pyfrom builtin and test reposThis PR is breaking because of removal of various names from
spack.package, but breakage should be minimal thanks to #50496, which ensures the above names are always imported in repo v1 packages.Specifically this PR breaks imports like the following in
package.pyfiles:but if your repo is v1.0 (see
spack repo list) and has the following much more common patternnothing should break.