Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

Packaging updates #77

Open
wants to merge 2 commits into
base: develop
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
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[run]
omit = molo/profiles/migrations/*
source= molo/profile/
source = molo/profile/
111 changes: 103 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,110 @@
*.pyc
/ve/
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

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

/testapp/
# 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
.coverage.*
.cache
.DS_Store
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# PyCharm / IntelliJ
# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

# Additional custom rules
/static/
/media/
db.sqlite3

.DS_Store
.idea/

/ve/
/testapp/
19 changes: 7 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
sudo: false
language: python
python:
- "2.7"
cache:
directories:
- $HOME/.pip-cache/
- '2.7'
cache: pip
before_install:
- pip install --upgrade pip
install:
- pip install twine
- pip install --upgrade pip --cache-dir $HOME/.pip-cache/
- pip install coveralls coverage --cache-dir $HOME/.pip-cache/
- pip install flake8 --cache-dir $HOME/.pip-cache/
- pip install -r requirements-dev.txt --cache-dir $HOME/.pip-cache/
- pip install -e . --cache-dir $HOME/.pip-cache/
- pip install -r requirements-dev.txt
- pip install coveralls
script:
- flake8 molo
- molo scaffold testapp
- mkdir -p testapp/testapp/templates/registration/
- cp molo/profiles/test_templates/login.html testapp/testapp/templates/registration/
- flake8 testapp
- pip install -e testapp
- py.test --cov=molo
- flake8 molo
after_success:
- coveralls
deploy:
Expand Down
3 changes: 1 addition & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2014, Praekelt Foundation and individual contributors.
Copyright (c) 2017, Praekelt.org and individual contributors.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand All @@ -21,4 +21,3 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

8 changes: 6 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ include LICENSE
include README.rst
include VERSION
include MANIFEST.in
include requirements.txt
include requirements-dev.txt
recursive-include molo LICENSE VERSION *.py *.txt *.scss *.js *.html *.json *.yml *.yaml *.rst *.in *.sh

recursive-include molo/profiles/templates *
recursive-include molo/profiles/test_templates *

global-exclude __pycache__
global-exclude *.py[co]
7 changes: 4 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
-e .
beautifulsoup4
flake8
pytest==2.9.2
pytest-django==2.9.1
pytest-cov
pytest-django==2.9.1
pytest-xdist
flake8
responses
beautifulsoup4
7 changes: 2 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
molo.core<6.0.0,>=5.0.0
celery<4.0
django-phonenumber-field
django-import-export
django-daterange-filter
# Our dependencies are all specified in setup.py
-e .
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ ignore = F403
[pytest]
addopts = --verbose --ds=testapp.settings --nomigrations --cov=molo --cov-report=term -s ./molo
looponfailroots = molo

[metadata]
license-file = LICENSE
70 changes: 39 additions & 31 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,39 +1,47 @@
import codecs
import os

from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.rst')) as f:
readme = f.read()
HERE = os.path.abspath(os.path.dirname(__file__))

with open(os.path.join(here, 'requirements.txt')) as f:
requires = filter(None, f.readlines())

with open(os.path.join(here, 'requirements-dev.txt')) as f:
requires_dev = filter(None, f.readlines())
def read(*parts):
with codecs.open(os.path.join(HERE, *parts), 'rb', 'utf-8') as f:
return f.read()

with open(os.path.join(here, 'VERSION')) as f:
version = f.read().strip()

setup(name='molo.profiles',
version=version,
description=('User profiles to be used with Molo.'),
long_description=readme,
classifiers=[
"Programming Language :: Python",
"Framework :: Django",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
],
author='Praekelt Foundation',
author_email='[email protected]',
url='http://github.com/praekelt/molo.profiles',
license='BSD',
keywords='praekelt, mobi, web, django',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
namespace_packages=['molo'],
install_requires=requires,
tests_require=requires_dev,
entry_points={})
install_requires = [
'molo.core<6.0.0,>=5.0.0',
'celery<4.0',
'django-daterange-filter',
'django-import-export',
'django-phonenumber-field',
]

setup(
name='molo.profiles',
version=read('VERSION'),
description='User profiles to be used with Molo.',
long_description=read('README.rst'),
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
],
author='Praekelt.org',
author_email='[email protected]',
url='http://github.com/praekelt/molo.profiles',
license='BSD-3-Clause',
keywords='praekelt, mobi, web, django',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
namespace_packages=['molo'],
install_requires=install_requires,
)