Skip to content

Commit

Permalink
Fix installation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bulletmark committed Nov 11, 2019
1 parent 4d2b3bf commit 2366985
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 77 deletions.
21 changes: 11 additions & 10 deletions Makefile
Expand Up @@ -12,36 +12,37 @@
# General Public License at <http://www.gnu.org/licenses/> for more
# details.

DOC = README.md

NAME = b2restore
SCRIPTS = b2restore-create-dummy-files b2restore-create-git
SCRIPTS = $(NAME)-create-dummy-files $(NAME)-create-git

DOC = README.md
DOCOUT = $(DOC:.md=.html)

all:
@echo "Type sudo make install|uninstall, or make doc|check|clean"
@echo "Type sudo make install|uninstall"
@echo "or make sdist|upload|doc|check|clean"

install:
@./install.sh -d "$(DESTDIR)"
pip3 install .

uninstall:
@./install.sh -d "$(DESTDIR)" -u $(NAME)
pip3 uninstall $(NAME)

sdist:
python3 setup.py sdist

upload: sdist
twine upload dist/*
twine3 upload dist/*

doc: $(DOCOUT)

$(DOCOUT): $(DOC)
markdown $< >$@

check:
flake8 $(NAME).py $(NAME) setup.py
vermin -i -q $(NAME).py $(NAME) setup.py
shellcheck $(SCRIPTS)

$(DOCOUT): $(DOC)
markdown $< >$@

clean:
@rm -vrf $(DOCOUT) *.egg-info build/ dist/ __pycache__/
5 changes: 3 additions & 2 deletions README.md
Expand Up @@ -12,12 +12,13 @@ Arch users can install [b2restore from the
AUR](https://aur.archlinux.org/packages/b2restore/).

Requires python 3.5 or later. Note [b2restore is on
PyPI](https://pypi.org/project/b2restore/) so you can `sudo pip install
PyPI](https://pypi.org/project/b2restore/) so you can `sudo pip3 install
b2restore` or:

```
$ git clone http://github.com/bulletmark/b2restore
$ sudo make install
$ cd b2restore
$ sudo pip3 install .
```

### CREATION OF INITIAL RCLONE COPY
Expand Down
56 changes: 0 additions & 56 deletions install.sh

This file was deleted.

18 changes: 9 additions & 9 deletions setup.py
Expand Up @@ -2,35 +2,35 @@
# Setup script to install this package.
# M.Blakeney, Mar 2018.

import re, stat
import stat
from pathlib import Path
from setuptools import setup

name = 'b2restore'
module = name.replace('-', '_')
here = Path(__file__).resolve().parent
name = re.sub(r'-.*', '', here.stem)
readme = here.joinpath('README.md').read_text()
executable = stat.S_IEXEC | stat.S_IXGRP | stat.S_IXOTH

setup(
name=name,
version='1.9.3',
version='1.9.4',
description='Program to recreate Backblaze B2 file archive at'
'specified date+time',
long_description=readme,
long_description=here.joinpath('README.md').read_text(),
long_description_content_type='text/markdown',
url='https://github.com/bulletmark/{}'.format(name),
author='Mark Blakeney',
author_email='mark@irsaere.net',
keywords='backblaze b2',
license='GPLv3',
py_modules=[name],
py_modules=[module],
python_requires='>=3.5',
classifiers=[
'Programming Language :: Python :: 3',
],
data_files=[
('share/doc/{}'.format(name), ['README.md']),
('share/{}'.format(name), ['README.md']),
],
scripts=[f.name for f in here.iterdir()
if f.is_file() and f.stat().st_mode & executable]
scripts=[f.name for f in here.iterdir() if f.name.startswith(name)
and f.is_file() and f.stat().st_mode & executable],
)

0 comments on commit 2366985

Please sign in to comment.