Commit 0edc21e1 authored by Marcel Huber's avatar Marcel Huber
Browse files

setup: adapted setup.py to layout seen in wheel

(https://bitbucket.org/pypa/wheel/src)

adjusted markdown style in README

documented how to run tests using nosetests

build command should only create a wheel as default

Change-Id: I7fc1582603916467003252dfeff256cfdcd14ae0
parent 6dbf7122
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?>
<pydev_project>
<?eclipse-pydev version="1.0"?><pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.6</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/${PROJECT_DIR_NAME}/SConsider</path>
</pydev_pathproperty>
</pydev_project>
include SConsider/*.yaml *.txt
recursive-include SConsider/3rdparty *.sconsider
include SConsider/maintenance/*.py
include SConsider/xmlbuilder/LICENSE
include SConsider/site_tools/*.sh
prune SConsider/3rdparty/*/.build
# Build a development version
SConsider
=========
SCons extension to provide a recursive target detection and dependency
handling mechanism.
Build a development version
---------------------------
Given the fact that we use git as VCS, we can not use the tag_svn_revision
feature of egg_info. Therefor we make use of the gitegginfo module.
......@@ -6,15 +14,42 @@ feature of egg_info. Therefor we make use of the gitegginfo module.
The following command makes use of it and creates the necessary egg-info
directory using the current commit hash appended:
`python setup.py gitegginfo --tag-git-desc --tag-build .dev develop`
`python setup.py gitegginfo --tag-git-desc --tag-build .dev develop`
Run tests
---------
# Run tests
Test can either be run the conventional way using the default test framework:
`python setup.py test`
`python setup.py test`
# Create a source/wheel package
or by using nose which is a build dependency of the module calling:
`python setup.py nosetests --with-xunit --where tests/`
The latter is required if you need to get test results in junit xml style to
be analyzed by jenkins for example.
Create a source/wheel package
-----------------------------
For a short packaging guide check this page: http://python-packaging-user-guide.readthedocs.org/en/latest/tutorial.html
For a short tutorial on wheels check this page: http://wheel.readthedocs.org/en/latest/
`python setup.py sdist bdist_wheel upload`
`python setup.py bdist_wheel`
To combine source distribution, wheel creation and uploading to PYPI you could use the following command:
`python setup.py sdist bdist_wheel upload`
Overview of available commands
------------------------------
To get an overview of available commands use:
`python setup.py --help-commands`
Help regarding a specific command can be retrieved using:
`python setup.py <command> --help`
pyaml
lepl
nose
mockito
pyopenssl
# __variables__ with double-quoted values will be available in setup.py:
__version__ = "0.5.0"
[metadata]
license-file = LICENSE.txt
[bdist_wheel]
python-tag = py2
[flake8]
statistics = 1
ignore = E501
[nosetests]
with-xunit = true
where = tests
[easy_install]
from setuptools import setup, find_packages
import os.path
import codecs
import re
setup(
name="SConsider",
version="1.5.0",
packages=find_packages(
exclude=[
'*.maintenance',
'tests']),
install_requires=[
'scons >=1.3, <=2.3.0',
'pyaml',
'pyopenssl',
'lepl'],
package_data={
'': [
'license.txt',
'*.yaml',
'3rdparty/*/*.sconsider',
'site_tools/*.sh'],
},
dependency_links=[],
include_package_data=True,
setup_requires = ['setuptools-git >= 1.0', 'gitegginfo'],
exclude_package_data = {'': ['.gitignore', '.gitreview', '.project', '.pydevproject'],},
test_suite='tests',
tests_require=['nose','mockito'],
author="Marcel Huber",
author_email="marcel.huber@hsr.ch",
license="BSD",
description="scons build system extension",
long_description="""\
The main goal/feature of this SCons extension is to provide a recursive target
detection and dependency handling mechanism.
""",
url="https://redmine.coast-project.org/projects/sconsider",
# classifier list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
"Development Status :: 4 - Beta",
# "Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Operating System :: POSIX :: SunOS/Solaris",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Topic :: Software Development :: Build Tools"],
)
from setuptools import setup
here = os.path.abspath(os.path.dirname(__file__))
README = codecs.open(os.path.join(here, 'README.txt'), encoding='utf8').read()
CHANGES = codecs.open(
os.path.join(
here,
'CHANGES.txt'),
encoding='utf8').read()
with codecs.open(os.path.join(os.path.dirname(__file__), 'SConsider', 'version.py'),
encoding='utf8') as version_file:
metadata = dict(
re.findall(
r"""__([a-z]+)__ = "([^"]+)""",
version_file.read()))
setup(name="SConsider",
version=metadata['version'],
description="scons build system extension",
long_description=README + '\n\n' + CHANGES,
# classifier list:
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
"Development Status :: 4 - Beta",
# "Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Operating System :: POSIX :: SunOS/Solaris",
"Programming Language :: Python",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Topic :: Software Development :: Build Tools"],
author="Marcel Huber",
author_email="marcel.huber@hsr.ch",
url="https://redmine.coast-project.org/projects/sconsider",
keywords=['sconsider', 'scons', 'build'],
license="BSD",
packages=[
'SConsider',
'SConsider.site_tools',
'SConsider.xmlbuilder'],
install_requires=[
'scons >=1.3, <=2.3.0',
'pyaml',
'pyopenssl',
'lepl'],
setup_requires=['gitegginfo', 'flake8'],
test_suite='tests',
tests_require=['nose', 'mockito'],
include_package_data=True,
zip_safe=False,
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment