Skip to content

Commit

Permalink
easier setup (#4)
Browse files Browse the repository at this point in the history
* makefile
* editorconfig
* setup: import version from package
  • Loading branch information
nitely authored Nov 14, 2016
1 parent 0b2a16b commit 7e6a5b4
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 53 deletions.
4 changes: 4 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[report]
omit =
runtests.py
setup.py
27 changes: 27 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This file is for unifying the coding style for different editors and IDEs.
# More information at http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

# 4 space indentation
[*.py]
indent_style = space
indent_size = 4

# Matches the exact files either package.json or .travis.yml
[{package.json,.travis.yml}]
indent_style = space
indent_size = 2

# Override for Makefile
[{Makefile, makefile, GNUmakefile}]
indent_style = tab
indent_size = 4
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
clean:
rm -fr dist/ doc/_build/ *.egg-info/

docs:
cd docs && make clean && make html

test:
python runtests.py

sdist: test clean
python setup.py sdist

release: test clean
python setup.py sdist upload

.PHONY: clean docs test sdist release
50 changes: 0 additions & 50 deletions run_tests.py

This file was deleted.

11 changes: 8 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,23 @@
import os
from setuptools import setup

README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()

URL = 'https://github.com/nitely/django-infinite-scroll-pagination'
README = "For more info, go to: {}".format(URL)

VERSION = __import__('spirit').__version__

# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))

setup(
name='django-infinite-scroll-pagination',
version='0.1.3',
version=VERSION,
description='infinite-scroll-pagination is a Django app that implements the *seek method* for scalable pagination..',
author='Esteban Castro Borsani',
author_email='ecastroborsani@gmail.com',
long_description=README,
url='https://github.com/nitely/django-infinite-scroll-pagination',
url=URL,
packages=[
'infinite_scroll_pagination',
],
Expand All @@ -32,6 +36,7 @@
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
],
Expand Down

0 comments on commit 7e6a5b4

Please sign in to comment.