Skip to content

Commit aed9ddf

Browse files
author
Pierre Raybaut
committed
Added changelog, license, manifest, readme and setup.py (not tested)
1 parent b1e4eeb commit aed9ddf

File tree

5 files changed

+185
-0
lines changed

5 files changed

+185
-0
lines changed

CHANGELOG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
= History of changes =
2+
3+
== Version 6.1.2 ==
4+
5+
First public release.

LICENSE

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
qwt License Agreement (MIT License)
2+
-----------------------------------
3+
4+
Copyright (c) 2014-2015 Pierre Raybaut
5+
6+
Permission is hereby granted, free of charge, to any person
7+
obtaining a copy of this software and associated documentation
8+
files (the "Software"), to deal in the Software without
9+
restriction, including without limitation the rights to use,
10+
copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
copies of the Software, and to permit persons to whom the
12+
Software is furnished to do so, subject to the following
13+
conditions:
14+
15+
The above copyright notice and this permission notice shall be
16+
included in all copies or substantial portions of the Software.
17+
18+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
20+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25+
OTHER DEALINGS IN THE SOFTWARE.
26+
27+
28+
Included software
29+
-----------------
30+
31+
License terms are included in any software used inside qwt's source code.

MANIFEST.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
recursive-include qwt *.png *.svg *.pot *.po *.mo *.dcm *.ui
2+
recursive-include src *.hpp *.cpp *.pyx
3+
recursive-include doc *.py *.rst *.png *.ico
4+
include MANIFEST.in
5+
include LICENSE
6+
include README
7+
include CHANGELOG

README

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
qwt
2+
===
3+
4+
Copyright © 2014-2015 Pierre Raybaut
5+
Licensed under the terms of the MIT License (see qwt/LICENSE)
6+
7+
8+
Overview
9+
10+
The `qwt` package is a pure Python implementation of Qwt C++ library with
11+
the following limitations.
12+
13+
The following `Qwt` classes won't be reimplemented in `qwt` because most
14+
powerful features already exist in `guiqwt`:
15+
- QwtPlotZoomer
16+
- QwtCounter
17+
- QwtEventPattern
18+
- QwtPicker
19+
- QwtPlotPicker
20+
21+
Dependencies
22+
23+
Requirements
24+
Python >=2.6 or Python >=3.0
25+
PyQt4 >=4.4
26+
NumPy >= 1.5
27+
28+
Installation
29+
30+
From the source package:
31+
python setup.py install
32+

setup.py

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright © 2014-2015 Pierre Raybaut
4+
# Licensed under the terms of the MIT License
5+
# (see qwt/LICENSE for details)
6+
7+
"""
8+
qwt
9+
====
10+
11+
Qt Widget Tools for Python
12+
"""
13+
14+
from __future__ import print_function
15+
16+
import os
17+
import sys
18+
import os.path as osp
19+
20+
from distutils.core import setup
21+
from distutils.command.build import build
22+
23+
LIBNAME = 'qwt'
24+
from guidata import __version__ as version
25+
26+
DESCRIPTION = 'qwt is a pure Python implementation of Qwt C++ library, using PyQt and NumPy'
27+
LONG_DESCRIPTION = ''
28+
KEYWORDS = ''
29+
CLASSIFIERS = ['Development Status :: 5 - Production/Stable',
30+
'Topic :: Scientific/Engineering']
31+
32+
33+
def get_package_data(name, extlist):
34+
"""Return data files for package *name* with extensions in *extlist*"""
35+
flist = []
36+
# Workaround to replace os.path.relpath (not available until Python 2.6):
37+
offset = len(name)+len(os.pathsep)
38+
for dirpath, _dirnames, filenames in os.walk(name):
39+
for fname in filenames:
40+
if not fname.startswith('.') and osp.splitext(fname)[1] in extlist:
41+
flist.append(osp.join(dirpath, fname)[offset:])
42+
return flist
43+
44+
45+
def get_subpackages(name):
46+
"""Return subpackages of package *name*"""
47+
splist = []
48+
for dirpath, _dirnames, _filenames in os.walk(name):
49+
if osp.isfile(osp.join(dirpath, '__init__.py')):
50+
splist.append(".".join(dirpath.split(os.sep)))
51+
return splist
52+
53+
54+
try:
55+
import sphinx
56+
except ImportError:
57+
sphinx = None
58+
59+
from distutils.command.build import build as dftbuild
60+
61+
class build(dftbuild):
62+
def has_doc(self):
63+
if sphinx is None:
64+
return False
65+
setup_dir = os.path.dirname(os.path.abspath(__file__))
66+
return os.path.isdir(os.path.join(setup_dir, 'doc'))
67+
sub_commands = dftbuild.sub_commands + [('build_doc', has_doc)]
68+
69+
cmdclass = {'build' : build}
70+
71+
if sphinx:
72+
from sphinx.setup_command import BuildDoc
73+
class build_doc(BuildDoc):
74+
def run(self):
75+
# make sure the python path is pointing to the newly built
76+
# code so that the documentation is built on this and not a
77+
# previously installed version
78+
build = self.get_finalized_command('build')
79+
sys.path.insert(0, os.path.abspath(build.build_lib))
80+
try:
81+
sphinx.setup_command.BuildDoc.run(self)
82+
except UnicodeDecodeError:
83+
print("ERROR: unable to build documentation because Sphinx do not handle source path with non-ASCII characters. Please try to move the source package to another location (path with *only* ASCII characters).", file=sys.stderr)
84+
sys.path.pop(0)
85+
86+
cmdclass['build_doc'] = build_doc
87+
88+
89+
setup(name=LIBNAME, version=version,
90+
download_url='http://%s.googlecode.com/files/%s-%s.zip' % (
91+
LIBNAME, LIBNAME, version),
92+
description=DESCRIPTION, long_description=LONG_DESCRIPTION,
93+
packages=get_subpackages(LIBNAME),
94+
package_data={LIBNAME:
95+
get_package_data(LIBNAME, ('.png', '.svg', '.mo'))},
96+
requires=["PyQt4 (>4.3)",],
97+
author = "Pierre Raybaut",
98+
author_email = 'pierre.raybaut@gmail.com',
99+
# url = 'http://www.cea.fr',
100+
classifiers=CLASSIFIERS + [
101+
'Operating System :: MacOS',
102+
'Operating System :: Microsoft :: Windows',
103+
'Operating System :: OS Independent',
104+
'Operating System :: POSIX',
105+
'Operating System :: Unix',
106+
'Programming Language :: Python :: 2.6',
107+
'Programming Language :: Python :: 2.7',
108+
'Programming Language :: Python :: 3',
109+
],
110+
cmdclass=cmdclass)

0 commit comments

Comments
 (0)