Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions bump-ver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions rpm/nvmetcli.spec.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading