diff --git a/README b/README index 6a7beb1..a8e520e 100644 --- a/README +++ b/README @@ -10,7 +10,7 @@ Please install the configshell-fb package from https://github.com/open-iscsi/configshell-fb first. nvmetcli can be run directly from the source directory or installed -using setup.py. +using pip install . Common Package Dependencies and Problems ----------------------------------------- diff --git a/bump-ver.sh b/bump-ver.sh index 21f7df3..232d84c 100755 --- a/bump-ver.sh +++ b/bump-ver.sh @@ -15,8 +15,8 @@ if [ -z "$VER" ]; then fi make clean -sed -i "s/version =.*,/version = $VER,/" setup.py -git add setup.py +sed -i "s/^version = .*/version = \"$VER\"/" pyproject.toml +git add pyproject.toml git commit -m "bump version to v$VER" git tag -s "v$VER" -m "nvmetcli release v$VER" diff --git a/debian/rules b/debian/rules index 1869a24..85c92c2 100755 --- a/debian/rules +++ b/debian/rules @@ -8,13 +8,13 @@ export http_proxy = http://127.0.0.1:9 %: - dh $@ --with python2 --with systemd + dh $@ --with python3 --with systemd override_dh_auto_build: - python setup.py build + python3 -m build override_dh_auto_install: - python setup.py install --root=$(install_dir) --install-layout=deb + pip3 install --root=$(install_dir) --prefix=/usr . override_dh_auto_clean: dh_auto_clean diff --git a/rpm/nvmetcli.spec.tmpl b/rpm/nvmetcli.spec.tmpl index ce454a2..ae8e6eb 100644 --- a/rpm/nvmetcli.spec.tmpl +++ b/rpm/nvmetcli.spec.tmpl @@ -8,7 +8,7 @@ URL: http://git.infradead.org/users/hch/nvmetcli.git Source: nvmetcli-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-rpmroot BuildArch: noarch -BuildRequires: python-devel python-setuptools systemd-units +BuildRequires: python3-devel python3-pip python3-build systemd-units Requires: python-configshell python-kmod Requires(post): systemd Requires(preun): systemd @@ -23,11 +23,11 @@ as well as saving / restoring the configuration to / from a json file. %setup -q -n nvmetcli-%{version} %build -%{__python} setup.py build +%{__python3} -m build %install rm -rf %{buildroot} -%{__python} setup.py install --skip-build --root=%{buildroot} --prefix=usr +pip3 install --root=%{buildroot} --prefix=usr . mkdir -p %{buildroot}%{_sysconfdir}/nvmet mkdir -p %{buildroot}%{_unitdir} install -m 644 nvmet.service %{buildroot}%{_unitdir}/nvmet.service