-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We moved every package informations into 'setup.cfg' and now 'setup.py' is only an entrypoint for setuptools. tox and pytest configurations has been moved also into 'setup.cfg'. Makefile has been updated and python-venv has been dropped in profit of virtualenv to ease development.
- Loading branch information
Showing
11 changed files
with
185 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,41 @@ | ||
# virtualenv | ||
.venv | ||
|
||
# Packaging | ||
build | ||
dist | ||
*.egg-info | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# virtualenv | ||
/venv | ||
# Site media | ||
/data/ | ||
|
||
# Distribution / packaging | ||
.installed.cfg | ||
dist/ | ||
*.egg-info | ||
# Settings | ||
local.py | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
.pytest_cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
.hypothesis/ | ||
.pytest_cache | ||
|
||
# Various | ||
boussole/dev_inspector.py | ||
# Temp files | ||
*~ | ||
.~lock* | ||
|
||
# Swap files | ||
*.sw[po] | ||
|
||
# SASS | ||
.sass-cache | ||
|
||
# Exported strings & generated translation templates | ||
*.pot | ||
|
||
# Tests | ||
.tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,57 @@ | ||
PYTHON=python3 | ||
|
||
PIP=venv/bin/python -m pip | ||
FLAKE=venv/bin/flake8 | ||
PYTEST=venv/bin/py.test | ||
|
||
.PHONY: help clean delpyc tests flake quality | ||
PYTHON_INTERPRETER=python3 | ||
VENV_PATH=.venv | ||
PIP=$(VENV_PATH)/bin/pip | ||
FLAKE=$(VENV_PATH)/bin/flake8 | ||
PYTEST=$(VENV_PATH)/bin/pytest | ||
|
||
help: | ||
@echo "Please use \`make <target>' where <target> is one of" | ||
@echo | ||
@echo " clean -- to clean local repository from all stuff created during development" | ||
@echo " delpyc -- to remove all *.pyc files, this is recursive from the current directory" | ||
@echo " flake -- to launch Flake8 checking on boussole code (not the tests)" | ||
@echo " tests -- to launch tests using py.test" | ||
@echo " quality -- to launch Flake8 checking and tests with py.test" | ||
@echo " release -- to release new package on Pypi (WARNING)" | ||
@echo " install -- to install this project with virtualenv and Pip" | ||
@echo "" | ||
@echo " clean -- to clean EVERYTHING" | ||
@echo " clean-install -- to clean installation" | ||
@echo " clean-pycache -- to remove all __pycache__, this is recursive from current directory" | ||
@echo "" | ||
@echo " flake -- to launch Flake8 checking" | ||
@echo " tests -- to launch tests using Pytest" | ||
@echo " quality -- to launch Flake8 checking and Pytest" | ||
@echo | ||
|
||
delpyc: | ||
clean-pycache: | ||
find . -type d -name "__pycache__"|xargs rm -Rf | ||
find . -name "*\.pyc"|xargs rm -f | ||
rm -Rf .pytest_cache | ||
.PHONY: clean-pycache | ||
|
||
clean-install: | ||
rm -Rf $(VENV_PATH) | ||
rm -Rf .tox | ||
rm -Rf boussole.egg-info | ||
.PHONY: clean-install | ||
|
||
clean: delpyc | ||
rm -Rf venv dist .tox boussole.egg-info .cache tests/__pycache__/ | ||
clean: clean-install clean-pycache | ||
.PHONY: clean | ||
|
||
venv: | ||
$(PYTHON) -m venv venv | ||
virtualenv -p $(PYTHON_INTERPRETER) $(VENV_PATH) | ||
# This is required for those ones using ubuntu<16.04 | ||
$(PIP) install --upgrade pip | ||
$(PIP) install --upgrade setuptools | ||
.PHONY: venv | ||
|
||
install: venv | ||
$(PIP) install -e . | ||
|
||
install-dev: install | ||
$(PIP) install -r requirements/dev.txt | ||
mkdir -p data | ||
$(PIP) install -e .[dev] | ||
.PHONY: install | ||
|
||
flake: | ||
$(FLAKE) --show-source boussole | ||
.PHONY: flake | ||
|
||
tests: | ||
$(PYTEST) -vv tests | ||
$(PYTEST) -vv --exitfirst tests/ | ||
.PHONY: tests | ||
|
||
quality: tests flake | ||
|
||
release: | ||
python setup.py sdist | ||
python setup.py sdist upload | ||
.PHONY: quality |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,25 @@ | ||
# -*- coding: utf-8 -*- | ||
"""Commandline interface to build Sass projects using libsass-python""" | ||
__version__ = '1.3.0' | ||
from __future__ import absolute_import, unicode_literals | ||
|
||
import os | ||
from setuptools.config import read_configuration | ||
|
||
import pkg_resources | ||
|
||
PROJECT_DIR = os.path.join(os.path.dirname(__file__), "..") | ||
|
||
|
||
def _extract_version(package_name): | ||
""" | ||
Get package version from installed distribution or configuration file if not | ||
installed | ||
""" | ||
try: | ||
return pkg_resources.get_distribution(package_name).version | ||
except pkg_resources.DistributionNotFound: | ||
_conf = read_configuration(os.path.join(PROJECT_DIR, "setup.cfg")) | ||
return _conf["metadata"]["version"] | ||
|
||
|
||
__version__ = _extract_version("boussole") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,86 @@ | ||
[aliases] | ||
test=pytest | ||
;; | ||
;; Boussole package | ||
;; | ||
[metadata] | ||
name = boussole | ||
version =1.4.0 | ||
description = Commandline interface to build Sass projects using libsass-python | ||
long_description = file:README.rst | ||
long_description_content_type = text/x-rst | ||
author = David Thenon | ||
author_email = [email protected] | ||
url = https://github.com/sveetch/boussole | ||
license = MIT | ||
keywords = Scss, Sass, Libsass, watchdog | ||
classifiers = | ||
License :: OSI Approved :: MIT License | ||
Operating System :: OS Independent | ||
Development Status :: 5 - Production/Stable | ||
Environment :: Console | ||
Programming Language :: Python | ||
Programming Language :: Python :: 2.7 | ||
Programming Language :: Python :: 3.5 | ||
Intended Audience :: Developers | ||
Topic :: Internet | ||
Topic :: Software Development :: Compilers | ||
Topic :: Software Development :: Libraries :: Python Modules | ||
|
||
[options] | ||
include_package_data = True | ||
install_requires = | ||
six | ||
click>=5.1,<6.0 | ||
pathtools | ||
watchdog | ||
libsass>=0.14.5 | ||
pyaml | ||
colorama | ||
colorlog | ||
packages = find: | ||
zip_safe = True | ||
|
||
[options.extras_require] | ||
dev = | ||
flake8 | ||
pytest | ||
sphinx | ||
sphinx-rtd-theme | ||
sphinx-autobuild | ||
|
||
[options.packages.find] | ||
where = . | ||
exclude= | ||
docs | ||
tests | ||
|
||
[wheel] | ||
universal = 1 | ||
|
||
;; | ||
;; Third-party packages configuration | ||
;; | ||
[flake8] | ||
max-line-length = 80 | ||
exclude = | ||
.git, | ||
.venv, | ||
build, | ||
venv, | ||
__pycache__, | ||
|
||
[tool:pytest] | ||
testpaths = tests | ||
python_files = *.py | ||
addopts = -vv | ||
python_files = | ||
*.py | ||
testpaths = | ||
tests | ||
|
||
[tox:tox] | ||
minversion = 3.4.0 | ||
envlist = py27, py35 | ||
|
||
[testenv] | ||
|
||
commands = | ||
pip install -e .[dev] | ||
pytest -vv tests |