
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 #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.
67 lines
2.7 KiB
Python
67 lines
2.7 KiB
Python
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
|
#
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
|
|
from spack_repo.builtin.build_systems.cmake import CMakePackage
|
|
|
|
from spack.package import *
|
|
|
|
|
|
class Rocpydecode(CMakePackage):
|
|
"""rocPyDecode is a set of Python bindings to rocDecode C++ library which provides
|
|
full HW acceleration for video decoding on AMD GPUs."""
|
|
|
|
homepage = "https://github.com/ROCm/rocPyDecode"
|
|
url = "https://github.com/ROCm/rocPyDecode/archive/refs/tags/rocm-6.2.0.tar.gz"
|
|
|
|
maintainers("afzpatel", "srekolam", "renjithravindrankannath")
|
|
version("6.3.3", sha256="df45b4a64ed3e550229fd91bcf7896d1a8fe377dd1ff88d2e6a71897b981180d")
|
|
version("6.3.2", sha256="c1b4dba9f8a28299279ad4e4aeb0c857c3a9772d016fcc0f164940f22faa6dee")
|
|
version("6.3.1", sha256="77ed22ee23409b004676fb1a11b963324b878e786dae0a56fdef58375716c9eb")
|
|
version("6.3.0", sha256="4d0d969fb32328d8277b5cc451ee875428f58c12c1d4b3ff33247774ecc6caf8")
|
|
version("6.2.4", sha256="9cdb8bdc65b54b2c02d6c950dd34cd702ec50d903aa4d252d1eb1f8cae8c0afb")
|
|
version("6.2.1", sha256="34c595cfe40ad74fcec2f52e7cc7be3ad8c8334030b0e98eb36305b6f63edc0d")
|
|
version("6.2.0", sha256="e465254cd3e96bbb59208e90293d7c6b7744b0fbcd928ef278ec568c83e63ff3")
|
|
|
|
depends_on("py-pybind11")
|
|
depends_on("ffmpeg@4.4:6")
|
|
depends_on("dlpack")
|
|
|
|
for ver in ["6.2.0", "6.2.1", "6.2.4", "6.3.0", "6.3.1", "6.3.2", "6.3.3"]:
|
|
depends_on(f"rocdecode@{ver}", when=f"@{ver}")
|
|
|
|
def patch(self):
|
|
filter_file(
|
|
r"${ROCM_PATH}/llvm/bin/clang++",
|
|
"{0}/bin/clang++".format(self.spec["llvm-amdgpu"].prefix),
|
|
"CMakeLists.txt",
|
|
string=True,
|
|
)
|
|
filter_file(
|
|
r"${ROCM_PATH}/lib/llvm/bin/clang++",
|
|
"{0}/bin/clang++".format(self.spec["llvm-amdgpu"].prefix),
|
|
"CMakeLists.txt",
|
|
string=True,
|
|
)
|
|
filter_file(
|
|
r"${ROCM_PATH}/share/rocdecode/utils",
|
|
"{0}/share/rocdecode/utils".format(self.spec["rocdecode"].prefix),
|
|
"CMakeLists.txt",
|
|
string=True,
|
|
)
|
|
|
|
def cmake_args(self):
|
|
args = [
|
|
self.define("rocDecode_PATH", self.spec["rocdecode"].prefix),
|
|
self.define("FFMPEG_INCLUDE_DIR", self.spec["ffmpeg"].prefix.include),
|
|
self.define("CMAKE_INSTALL_PREFIX_PYTHON", self.spec.prefix),
|
|
self.define("CMAKE_CXX_FLAGS", "-I{0}".format(self.spec["dlpack"].prefix.include)),
|
|
self.define(
|
|
"CMAKE_CXX_FLAGS",
|
|
"-DUSE_AVCODEC_GREATER_THAN_58_134 -I{0}".format(
|
|
self.spec["dlpack"].prefix.include
|
|
),
|
|
),
|
|
]
|
|
return args
|