From 175d72d3710506c6a225099dae5ce5583e22c151 Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Tue, 18 Jun 2019 15:13:00 -0300 Subject: [PATCH] Removing installation script and updating README.md --- .gitignore | 2 ++ README.md | 21 +++----------- install.py | 80 ------------------------------------------------------ setup.py | 1 - 4 files changed, 6 insertions(+), 98 deletions(-) delete mode 100755 install.py diff --git a/.gitignore b/.gitignore index ac2324c4..afa2b5e7 100755 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ env .idea __pycache__ *.orig +dist +*.egg-info diff --git a/README.md b/README.md index e7501da5..21db256b 100644 --- a/README.md +++ b/README.md @@ -6,35 +6,22 @@ It has also a management window allowing the user to see all installed applicati - Python3 and QT 5. ### Requirements -#### Debian-based distros - libappindicator3 (for GTK3 desktop environments) +#### Debian-based distros - python3-venv #### Arch-based distros - python - python-requests +- python-virtualenv - python-pip - python-pyqt5 ### Distribution -Currently only available for Arch Linux users via **AUR**. Other distros can install it manually (described bellow). +Currently available via **PyPi** (sudo pip3 install fpakman) or **AUR** (for Arch Linux users) -### Installation script -You can install the application without compromising your system via the provided installation script called 'install.py'. -Type in the terminal: -``` -sudo python3 install.py -``` -If you want to uninstall the application, just call the script the same way. - -To start the application, type in the terminal: -``` -fpakman -``` - ### Manual installation: -The following script shows how to install the application in a separate python environment to not mess up with your -system's python libraries. Inside the project directory type: +If you prefer a manual and isolated installation, type the following commands within the cloned project folder: ``` python3 -m venv env env/bin/pip install . diff --git a/install.py b/install.py deleted file mode 100755 index fae54698..00000000 --- a/install.py +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/env python3 -################################################################ -# # -# EXECUTE THIS SCRIPT INSIDE THE PROJECT FOLDER AS ROOT # -# # -################################################################ -import os -import sys -from shutil import rmtree - -from fpakman.core import system, flatpak - -if not os.geteuid() == 0: - sys.exit("\nOnly root can run this script\n") - - -runner_file = '/usr/local/bin/fpakman' -env_name = 'env' - - -def log(msg: str): - print('[fpakman] {}'.format(msg)) - - -if os.path.exists(runner_file): - log('already installed') - log('Do you wish to uninstall it ? (y/N)') - uninstall = input() - - if uninstall.lower() == 'y': - - if os.path.exists(runner_file): - - try: - os.remove(runner_file) - except: - log("Could not remove the runner file '{}'".format(runner_file)) - log("Aborting...") - exit(1) - - if os.path.exists('{}/{}'.format(os.getcwd(), env_name)): - try: - rmtree(env_name) - except: - log("Could not remove the virtualenv '{}'".format(env_name)) - log("Aborting") - exit(1) - - log("Successfully uninstalled") - - else: - log('Aborting...') -else: - if flatpak.get_version is None: - print('flatpak seems not to be installed. Aborting...') - exit(1) - - if not os.path.exists('env'): - log("Creating a new 'virtualenv' as '{}'...".format(env_name)) - res = system.run_cmd('python3 -m venv ' + env_name) - - if res is None: - log("Could create a virtualenv for installation. Check if 'virtualenv' is installed.") - log('Aborting...') - exit(1) - - res = system.run_cmd('env/bin/pip install .') - - if res: - log("Creating runner as '{}'".format(runner_file)) - with open(runner_file, 'w+') as f: - f.write('#!/bin/bash\n{d}/env/bin/fpakman'.format(d=os.getcwd())) - - system.run_cmd('chmod +x ' + runner_file) - - log('Successfully installed') - else: - log('Could not install python requirements to the virtualenv') - log('Aborting...') - exit(1) diff --git a/setup.py b/setup.py index b4119ba7..10344000 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,6 @@ setup( classifiers=[ 'Topic :: Utilities', 'Programming Language :: Python', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7'