# # spec file for package assisted-service-client # # Copyright (c) 2022 Karim Boumedhel # Name: assisted-service-client Version: 99.0.0.git.202411080854.51a2cc1 Release: 0%{?dist} Url: https://github.com/openshift/assisted-service Summary: Assisted Installer Client Library License: ASL 2.0 Group: Development/Languages/Python VCS: git+https://github.com/karmab/aicli#51a2cc1ff9c6068e44e978c75616e48f15731a06: Source: aicli-51a2cc1f.tar.gz AutoReq: no BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: java python3 python3-setuptools git Requires: python3 python3-certifi %description assisted-installer python library %global debug_package %{nil} %global __python /usr/bin/python3 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "import sys; from distutils.sysconfig import get_python_lib; sys.stdout.write(get_python_lib())")} %prep %setup -T -b 0 -q -n aicli %build curl https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.8/swagger-codegen-cli-2.4.8.jar > swagger-codegen-cli.jar # curl https://raw.githubusercontent.com/openshift/assisted-service/v2.27.0/swagger.yaml > swagger.yaml curl https://raw.githubusercontent.com/openshift/assisted-service/master/swagger.yaml > swagger.yaml sed -i '/pattern:/d' swagger.yaml echo '{"packageName" : "assisted_service_client", "packageVersion": "1.0.0"}' > swagger.spec java -jar swagger-codegen-cli.jar generate --lang python --config swagger.spec --output build --input-spec swagger.yaml %install cd build %{__python} setup.py install --prefix=%{_prefix} --root=%{buildroot} %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %{python_sitelib}/* %changelog