Skip to content

Python 2/3 compatibility and make able to standalone install inside virtualenv #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
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
64 changes: 63 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,68 @@
.idea
.*.swp
*.pyc
build/
smime.egg-info/
dist/
.pytest_cache/
.coverage

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
develop-eggs/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Translations
*.mo
*.pot
# dotenv
.env

# virtualenv
.venv
venv/
ENV/

# editor
.idea
.vscode
*.sublime-*
35 changes: 35 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Config file for automatic testing at travis-ci.org
dist: xenial
language: python
sudo: required
matrix:
include:
- name: Python 2.7
python: 2.7
env: python_version=2.7

- name: Python 3.5
python: 3.5
env: python_version=3.5

- name: Python 3.6
python: 3.6
env: python_version=3.6

- name: Python 3.7
python: 3.7
env: python_version=3.7

cache:
directories:
- eggs
install:
- pip install -U pipenv
- pipenv install --dev
- sleep 5
script:
- make lint
- make clean
- pytest -s --cov=smime/ -s --tb=native -v --cov-report term-missing --cov-append smime/
after_success:
- codecov
14 changes: 14 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
=======
CHANGES
=======

0.1.0b2 (unreleased)
--------------------

- Initial release.


0.1.0b1 (2019-01-06)
--------------------

- Initial release.
14 changes: 14 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
graft smime
include AUTHORS
include CONTRIBUTING.md
include CHANGES.rst
include LICENSE
include README.rst

recursive-exclude test *
recursive-exclude tool *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]

exclude Makefile .editorconfig Pipfile* tox.ini .coveragerc

32 changes: 32 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts

clean-build: ## remove build artifacts
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +

clean-pyc: ## remove Python file artifacts
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +

clean-test: ## remove test and coverage artifacts
rm -fr .tox/
rm -f .coverage
rm -fr htmlcov/
rm -fr .pytest_cache

lint: ## check style with flake8
flake8 smime/

isort: ## run isort recursively
isort smime/ -rc

test: ## run tests quickly with the default Python
py.test smime/tests

install: clean ## install the package to the active Python's site-packages
python setup.py install
19 changes: 19 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
smime = {path = ".",extras = ["test"],editable = true}

[packages]
cryptography = "*"
asn1crypto = "*"
flake8 = "*"
flake8-isort = "*"
isort = "*"
certifi = "*"
zest-releaser = {extras = ["recommended"],version = "*"}

[requires]
python_version = "2.7"
Loading