Skip to content

Commit

Permalink
updated docs and setup for new GitHub repo, readthedocs.org, and wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Zipay committed Apr 22, 2015
1 parent 05f0256 commit cea5a07
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 114 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@
__pycache__/
MANIFEST
Aglyph.egg-info/
aglyph-dev-env/
aglyph-*-env/
resources/movielisterapp-*.zip
example/movielisterapp-aglyph.sh
example/movielisterapp-basic.sh
NOTES.txt
build/
dist/
doc/build/
doc/bootswatch/
doc/cherrypy/
test-versions-variants.*
test_integration-*-env/

79 changes: 79 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Aglyph - Dependency Injection for Python

http://ninthtest.net/aglyph-python-dependency-injection/

[![Latest Version](https://pypip.in/version/Aglyph/badge.svg?text=version)](https://pypi.python.org/pypi/Aglyph/)
[![Supported Python versions](https://pypip.in/py_versions/Aglyph/badge.svg)](https://pypi.python.org/pypi/Aglyph/)
[![Supported Python implementations](https://pypip.in/implementation/Aglyph/badge.svg)](https://pypi.python.org/pypi/Aglyph/)
[![License](https://pypip.in/license/Aglyph/badge.svg)](https://pypi.python.org/pypi/Aglyph/)

## Introduction

Aglyph is a Dependency Injection framework for Python that...

* is non-obtrusive (no dependencies beyond the Python standard library; no need
to decorate your existing sources or adhere to any specific style
conventions)
* can inject even 3rd-party dependencies **and dependents**
* supports both constructor and setter injection
* can assemble *prototype*, *singleton*, *borg*, and *weakref* components
* is configurable in declarative style, either programmatically or using an XML
syntax (a
[commented DTD](https://github.com/mzipay/Aglyph/blob/master/resources/aglyph-context.dtd)
is provided, though configuration is not validated by default)
* supports templates (i.e. component inheritance) and lifecycle methods
* runs on Python 2 and 3 (same codebase)
* runs (and is proactively tested) on [CPython](http://www.python.org/),
[Jython](http://www.jython.org/), [IronPython](http://ironpython.net/),
[PyPy](http://pypy.org/>), and [Stackless Python](http://www.stackless.com/)

## Installation

[![Wheel Status](https://pypip.in/wheel/Aglyph/badge.svg)](https://pypi.python.org/pypi/Aglyph/)

The easiest way to install Aglyph is to use [pip](https://pip.pypa.io/):

```bash
$ pip install Aglyph
```

Alternative source and binary installation options are described below.

To verify that an installation was successful:

```python
>>> import aglyph
>>> aglyph.__version__
'2.1.0'
```

### Source installation

Clone or fork the repository:

```bash
$ git clone https://github.com/mzipay/Aglyph.git
```

Alternatively, download and extract a source _.zip_ or _.tar.gz_ archive from
https://github.com/mzipay/Aglyph/releases or https://pypi.python.org/pypi/Aglyph.

Run the test suite and install the `aglyph` package:

```bash
$ cd Aglyph
$ python setup.py test
$ python setup.py install
```

### Binary installation

Download the Python wheel (_.whl_) or _.egg_ from
https://pypi.python.org/pypi/Aglyph, or an _.exe_/_.msi_ Windows installer from
https://sourceforge.net/projects/aglyph/files/.

Use [pip](https://pip.pypa.io/) or
[wheel](https://pypi.python.org/pypi/wheel) to install the _.whl_;
[setuptools](https://pypi.python.org/pypi/setuptools) to install an
_.egg_; or run the Windows installer.

98 changes: 0 additions & 98 deletions README.txt

This file was deleted.

23 changes: 12 additions & 11 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,18 @@

import sys, os

import sphinx_bootstrap_theme
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
if (on_rtd):
html_theme = 'default'
else:
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('../cherrypy'))
sys.path.insert(0, os.path.abspath('../..')) # Aglyph

# -- General configuration -----------------------------------------------------
Expand Down Expand Up @@ -96,20 +101,16 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'bootstrap'
#html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
html_theme_options = {
"bootswatch_theme": "ninthtest",
"navbar_links": [
("↵ NinthTest.net", "http://ninthtest.net/", True),
],
}
#html_theme_options = {
#}

# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
#html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
Expand Down Expand Up @@ -168,7 +169,7 @@
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
html_use_opensearch = 'http://ninthtest.net/aglyph-python-dependency-injection/'
#html_use_opensearch = 'http://ninthtest.net/aglyph-python-dependency-injection/'

# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
Expand Down
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[bdist_wheel]
universal=1

8 changes: 7 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@
author="Matthew Zipay",
author_email="mattz@ninthtest.net",
url="http://ninthtest.net/aglyph-python-dependency-injection/",
download_url="http://sourceforge.net/projects/aglyph/files/aglyph/",
download_url="http://sourceforge.net/projects/aglyph/files/",
packages=["aglyph", "aglyph.compat", "aglyph.integration"],
test_suite="test",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Framework :: CherryPy",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
Expand All @@ -52,6 +53,11 @@
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: IronPython",
"Programming Language :: Python :: Implementation :: Jython",
"Programming Language :: Python :: Implementation :: PyPy",
"Programming Language :: Python :: Implementation :: Stackless",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules"],
Expand Down

0 comments on commit cea5a07

Please sign in to comment.