Skip to content

Commit 981a0fb

Browse files
committed
Restructure package.
1 parent 6cf20b2 commit 981a0fb

9 files changed

+167
-38
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,7 @@ ENV/
8787

8888
# Rope project settings
8989
.ropeproject
90+
91+
# Build artifacts
92+
AUTHORS
93+
CHANGELOG

.travis.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
notifications:
2+
email: false
3+
4+
sudo: false
5+
6+
language: python
7+
8+
cache: pip
9+
10+
python:
11+
- 2.7
12+
- 3.5
13+
- 3.6
14+
15+
matrix:
16+
fast_finish: true
17+
18+
before_install:
19+
- travis_retry pip install --upgrade pip setuptools
20+
21+
install:
22+
- pip install -e .[tests]
23+
24+
script:
25+
- ./run-tests.sh
26+
27+
deploy:
28+
provider: pypi
29+
user: jacquerie
30+
password:
31+
secure: "oyjPcIkMr81wGjLEwtyd0wLf97wTKUmIQnlNYqHblGSNtiQom4592/IwZdTB6HRd2VXydDCosuo/fLtI2NJ3TgXXroI/ulY/SGK7N2F3BdrYe/h8Xc7V619WVVQh6Q3Rn0DMy7Na3vOrBpUHPn+g7unpCNrMzHfYx1UjzSRXqaaTmisOqf/M75JYnQWzdJYLlBwrIwmb0p35nd1QOGU6YL4JxkcTuQm5ZclAz9EQaDTWuHPx8bx6M6CvztQb4Nm6Jed3DC8/O9pSqFOwK5iLTagtVxWYmYC7V1wFJGw7JWEnoKuP7l8oydN0Ogy/0n+vCpWdcWOG4F5yd1KKssnMtZ8D5eyWY2BY/vC+QuQWNmfvF4iNIfhAugoD+upl0099yF6WeEWSobvvSVox8MpmpFOANvNZjxOqO5bh42Vsq62smBFqqYG3p5SvvOYOgysNB16NxhuBRpDzV3aNqPcqvly913kuzITP7kBelKNs4dqJobk57dVqCNYlb/9i7cWXSWpb0iL7o846Ha1xwLbXCJeAMoR0GT7S6DNCs2XHw93CPg3qxk0G5AZ/34gPUhusA7GvDYUWZuXFWLxXq2CvJxnW4NqVyFqlCRx85eza9h1PstDDPSXQg8F9lvrnzdMCVAHacHiAqtjBA+xd5kqGXHc0mKoCGOiZ9YL2vgu6TRc="
32+
on:
33+
branch: master
34+
python: 2.7
35+
distribution: sdist

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016 Jacopo Notarstefano
3+
Copyright (c) 2016-2017 Jacopo Notarstefano
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

-25
This file was deleted.

README.rst

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
======================
2+
Flask-Shell-PTPython
3+
======================
4+
5+
.. image:: https://travis-ci.org/jacquerie/flask-shell-ptpython.svg?branch=master
6+
:target: https://travis-ci.org/jacquerie/flask-shell-ptpython
7+
8+
9+
About
10+
=====
11+
12+
Replace the default ``flask shell`` command with a similar one running PTPython.
13+
Inspired by `flask-shell-ipython`_ by `@ei-grad`_.
14+
15+
.. _`flask-shell-ipython`: https://github.com/ei-grad/flask-shell-ipython
16+
.. _`@ei-grad`: https://github.com/ei-grad
17+
18+
19+
Install
20+
=======
21+
22+
.. code-block:: console
23+
24+
$ pip install flask-shell-ptpython
25+
26+
27+
Usage
28+
=====
29+
30+
.. code-block:: console
31+
32+
$ flask shell
33+
>>>
34+
35+
36+
Author
37+
======
38+
39+
Jacopo Notarstefano (`@Jaconotar`_)
40+
41+
.. _`@Jaconotar`: https://twitter.com/Jaconotar
42+
43+
44+
License
45+
=======
46+
47+
MIT

flask_shell_ptpython.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# -*- coding: utf-8 -*-
2+
3+
from __future__ import absolute_import, division, print_function
4+
15
import os
26

37
import click
@@ -13,7 +17,7 @@ def shell_command():
1317
namespace of this shell according to its configuration.
1418
1519
This is useful for executing small snippets of management code
16-
without having to manually configuring the application.
20+
without having to manually configure the application.
1721
"""
1822
from flask.globals import _app_ctx_stack
1923
from ptpython.repl import embed

pytest.ini

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[pytest]
2+
addopts = --flake8
3+
flake8-ignore = *.py E501 FI12 FI14 FI15 FI16 FI17 FI50 FI51 FI53

run-tests.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
py.test flask_shell_ptpython.py

setup.py

+67-11
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,78 @@
1+
# -*- coding: utf-8 -*-
2+
3+
"""Replace the default ``flask shell`` command with a similar one running PTPython."""
4+
5+
from __future__ import absolute_import, division, print_function
6+
17
from setuptools import setup
28

39

10+
URL = 'https://github.com/jacquerie/flask-shell-ptpython'
11+
12+
readme = open('README.rst').read()
13+
14+
setup_requires = [
15+
'autosemver~=0.0,>=0.5.2',
16+
]
17+
18+
install_requires = [
19+
'Flask~=0.0,>=0.12.2',
20+
'click~=6.0,>=6.7',
21+
'ptpython~=0.0,>=0.41',
22+
]
23+
24+
docs_require = []
25+
26+
tests_require = [
27+
'flake8-future-import~=0.0,>=0.4.3',
28+
'pytest-flake8~=0.0,>=.0.9.1',
29+
'pytest~=3.0,>=3.2.3',
30+
]
31+
32+
extras_require = {
33+
'docs': docs_require,
34+
'tests': tests_require,
35+
}
36+
37+
extras_require['all'] = []
38+
for name, reqs in extras_require.items():
39+
extras_require['all'].extend(reqs)
40+
441
setup(
5-
name="flask-shell-ptpython",
6-
author="Jacopo Notarstefano",
7-
author_email="[email protected]",
8-
description="Replace the default `flask shell` command with a similar command running Ptpython.",
9-
url="http://github.com/jacquerie/flask-shell-ptpython",
10-
version="0.0.1",
42+
name='flask-shell-ptpython',
43+
autosemver={
44+
'bugtracker_url': URL + '/issues',
45+
},
46+
url=URL,
47+
license='MIT',
48+
author='Jacopo Notarstefano',
49+
author_email='[email protected]',
1150
py_modules=['flask_shell_ptpython'],
12-
install_requires=[
13-
'flask>=0.11',
14-
'click',
15-
'ptpython>=0.15',
16-
],
51+
include_package_data=True,
52+
zip_safe=False,
53+
platforms='any',
54+
description=__doc__,
55+
long_description=readme,
56+
setup_requires=setup_requires,
57+
install_requires=install_requires,
58+
tests_require=tests_require,
59+
extras_require=extras_require,
1760
entry_points={
1861
'flask.commands': [
1962
'shell=flask_shell_ptpython:shell_command',
2063
],
2164
},
65+
classifiers=[
66+
'Development Status :: 4 - Beta',
67+
'Environment :: Console',
68+
'Intended Audience :: Developers',
69+
'License :: OSI Approved :: MIT License',
70+
'Operating System :: OS Independent',
71+
'Programming Language :: Python :: 2',
72+
'Programming Language :: Python :: 2.7',
73+
'Programming Language :: Python :: 3',
74+
'Programming Language :: Python :: 3.5',
75+
'Programming Language :: Python :: 3.6',
76+
'Programming Language :: Python',
77+
],
2278
)

0 commit comments

Comments
 (0)