Lynn Rees avatar Lynn Rees committed f9a2c07

- initial

Comments (0)

Files changed (14)

+syntax:glob
+*.pyc
+*.egg-info
+*~
+.DS_Store
+.figleaf
+.coverage
+.project
+.pydevproject
+.git/
+.svn/
+.svn/*
+.settings/
+*.orig
+.tox/*
+venv/
+stuff/*
+syntax:regexp
+^build$
+^stuff$
+^dist$

Empty file added.

+include LICENSE.txt
+include MANIFEST.in
+include README.rst
+include setup.cfg
+include reqs/requires.txt
+include reqs/requires-2.6.txt
+recursive-include crossroads *.py

Empty file added.

crossroads/__init__.py

+# -*- coding: utf-8 -*-
+'''crossroads I/O bindings for Python.'''
+
+__version__ = (0, 1, 0)
+# -*- coding: utf-8 -*-
+'''crossroads fabfile'''
+
+from fabric.api import prompt, local, settings, env
+
+regup = './setup.py register sdist --format=bztar,zip upload'
+nodist = 'rm -rf dist'
+
+
+def getversion(fname):
+    '''
+    Get the __version__ without importing.
+    '''
+    for line in open(fname):
+        if line.startswith('__version__'):
+            return '%s.%s.%s' % eval(line[13:])
+
+
+def _promptup():
+    with settings(warn_only=True):
+        local('hg tag "%s"' % getversion('crossroads/__init__.py'))
+        local('hg push ssh://hg@bitbucket.org/lcrees/crossroads')
+        local('hg push github')
+
+
+def _test(val):
+    truth = val in ['py26', 'py27', 'py31', 'py32', 'py33', 'pypy']
+    if truth is False:
+        raise KeyError(val)
+    return val
+
+
+def tox_recreate():
+    '''recreate crossroads test env'''
+    prompt(
+        'Enter testenv: [py26, py27, py31, py32, py33, pypy]',
+        'testenv',
+        validate=_test,
+    )
+    local('tox --recreate -e %(testenv)s' % env)
+
+
+def releaser():
+    '''crossroads releaser'''
+    _promptup()
+    local(regup)
+    local(nodist)
+
+
+def inplace():
+    '''in-place crossroads'''
+    with settings(warn_only=True):
+        local('hg push ssh://hg@bitbucket.org/lcrees/crossroads')
+        local('hg push github')
+    local('./setup.py sdist --format=gztar,zip upload')
+    local(nodist)

reqs/dev_requires.txt

+distribute
+tox
+sphinx
+sphinxcontrib.spelling
+Sphinx-PyPI-upload
+Fabric
+hg-github

reqs/docs_requires.txt

+sphinx
+distribute

Empty file added.

Empty file added.

reqs/test_requires.txt

+nose
+coverage

Empty file added.

+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+'''setup for crossroads'''
+
+import sys
+from os import getcwd
+from os.path import join
+from setuptools import setup, find_packages
+
+
+def getversion(fname):
+    '''Get `__version__` without importing.'''
+    for line in open(fname):
+        if line.startswith('__version__'):
+            return '%s.%s.%s' % eval(line[13:].rstrip())
+
+if float('%d.%s' % sys.version_info[:2]) < 2.7:
+    reqs = 'reqs/requires-2.6.txt'
+else:
+    reqs = 'reqs/requires.txt'
+install_requires = list(l for l in open(join(getcwd(), reqs), 'r').readlines())
+
+setup(
+    name='crossroads',
+    version=getversion('crossroads/__init__.py'),
+    description='Configuration over convention.',
+    long_description=open(join(getcwd(), 'README.rst'), 'r').read(),
+    keywords='networking queue socket crossroads io',
+    license='BSD',
+    author='L. C. Rees',
+    author_email='lcrees@gmail.com',
+    url='https://bitbucket.org/lcrees/crossroads',
+    packages=find_packages(),
+    zip_safe=False,
+    install_requires=install_requires,
+    classifiers=[
+        'Development Status :: 3 - Alpha',
+        'Intended Audience :: Developers',
+        'Intended Audience :: System Administrators',
+        'License :: OSI Approved :: BSD License',
+        'Operating System :: MacOS :: MacOS X',
+        'Operating System :: Microsoft :: Windows',
+        'Operating System :: POSIX',
+        'Programming Language :: Python',
+        'Programming Language :: Python :: 2',
+        'Programming Language :: Python :: 3',
+        'Programming Language :: Python :: 2.6',
+        'Programming Language :: Python :: 2.7',
+        'Programming Language :: Python :: 3.1',
+        'Programming Language :: Python :: 3.2',
+        'Programming Language :: Python :: 3.3',
+        'Programming Language :: Python :: Implementation :: CPython',
+        'Programming Language :: Python :: Implementation :: PyPy',
+        'Topic :: System :: Networking',
+    ],
+)
+[tox]
+envlist = py26,py27,py31,py32,py33,pypy
+
+[testenv:py26]
+deps=
+  unittest2
+  -r{toxinidir}/reqs/test_requires.txt
+commands=
+  nosetests {posargs:--with-coverage  --cover-package=crossroads}
+  
+[testenv]
+deps=
+  -r{toxinidir}/reqs/test_requires.txt
+commands=
+  nosetests {posargs:--with-coverage --cover-package=crossroads}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.