Skip to content

Commit

Permalink
Use requirements.txt instead of installing using pip.main
Browse files Browse the repository at this point in the history
- Modified README accordingly
- Modified CI files accordingly
- Removed pip.main parts in setup script.
  • Loading branch information
fgoudreault committed Jun 20, 2018
1 parent a269d84 commit 358f820
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 19 deletions.
1 change: 1 addition & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ install:
- conda update --yes conda
- conda create -y -q -n test-environment python=%PYTHON_VERSION%
- activate test-environment
- pip install -r requirements.txt
- python setup.py develop
test_script:
- pytest
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ before_install:
- source activate test-environment
# install auxiclean package
install:
- pip install -r requirements.txt
- python setup.py develop
# execute tests
script:
Expand All @@ -49,8 +50,7 @@ after_success:

before_deploy:
- pip install pyinstaller
# there is a bug with pyinstaller and anaconda. Reverting to python 3.6.0 when bundling seems to fix this.
- conda install --yes python==3.6.0
- conda install --yes python==$TRAVIS_PYTHON_VERSION
- python bundle.py
deploy:
- provider: releases
Expand Down
3 changes: 2 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ Ensuite, cloner ou télécharger le projet sur le `répertoire officiel
<https://github.com/physumasso/auxiclean>`__ du projet sur GitHub
et décompresser le fichier si nécéssaire.

Pour installer le module, il faut executer le script d'installation `setup.py`::
Pour installer le module, il faut d'abord installer les prérequis et ensuite executer le script d'installation `setup.py`::

$ pip install -r requirements.txt
$ python setup.py install

Pour une installation de développement, utiliser l'argument ``develop`` au lieu
Expand Down
5 changes: 5 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
openpyxl
pytest
pytest-cov
coverage
pep8
16 changes: 0 additions & 16 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
from setuptools import setup
import pip
import sys
import versioneer


def win_pip_install(package, install_list):
if package not in install_list:
return
print("Installing %s using pip instead of setuptools." % package)
pip.main(["install", package])
install_list.remove(package)


# package required
install_packages = ["openpyxl", # to manage excel spreadsheets
]
Expand All @@ -26,13 +17,6 @@ def win_pip_install(package, install_list):
" purposes:"), develop_packages)
install_packages += develop_packages

# if on windows, there is a bug when installing some packages with setuptools.
# installing them with pip before setup fixes this.
problematics = ("coverage", )
if sys.platform == "win32":
for problematic in problematics:
win_pip_install(problematic, install_packages)

setup(name="auxiclean",
version=versioneer.get_version(),
description="Distributeur de taches d'auxiliariat d'enseignement",
Expand Down

0 comments on commit 358f820

Please sign in to comment.