Skip to content

Commit

Permalink
Prepare packaging.
Browse files Browse the repository at this point in the history
  • Loading branch information
aaugustin committed Nov 14, 2013
1 parent f63e880 commit 1aa31d0
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 16 deletions.
13 changes: 9 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
*.pyc
docs/_build
README.html
.coverage
htmlcov
compliance/reports
.DS_Store
build/
compliance/reports/
dist/
docs/_build/
htmlcov/
MANIFEST
README
README.html
websockets.egg-info/
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include INSTALL LICENSE README.rst requirements.txt
include LICENSE
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ coverage:
clean:
find . -name '*.pyc' -delete
find . -name __pycache__ -delete
rm -rf .coverage dist htmlcov MANIFEST
rm -rf .coverage build compliance/reports dist docs/_build htmlcov MANIFEST README websockets.egg-info
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
# built documents.
#
# The short X.Y version.
version = '0.1'
version = '1.0'
# The full version, including alpha/beta/rc tags.
release = '0.1'
release = '1.0.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

24 changes: 18 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
import distutils.core
import os
import sys
import setuptools

# Avoid polluting the .tar.gz with ._* files under Mac OS X
os.putenv('COPYFILE_DISABLE', 'true')

description = "An implementation of the WebSocket Protocol (RFC 6455)"

root = os.path.dirname(__file__)

with open(os.path.join(root, 'README.rst')) as f:
# Prevent distutils from complaining that a standard file wasn't found
README = os.path.join(root, 'README')
if not os.path.exists(README):
os.symlink(README + '.rst', README)

description = "An implementation of the WebSocket Protocol (RFC 6455)"

with open(os.path.join(root, 'README')) as f:
long_description = '\n\n'.join(f.read().split('\n\n')[1:])

with open(os.path.join(root, 'websockets', 'version.py')) as f:
exec(f.read())

distutils.core.setup(
py_version = sys.version_info[:2]

if py_version < (3, 3):
raise Exception("websockets requires Python >= 3.3.")

setuptools.setup(
name='websockets',
version=version,
author='Aymeric Augustin',
Expand All @@ -26,8 +37,9 @@
packages=[
'websockets',
],
install_requires=['asyncio'] if py_version == (3, 3) else [],
classifiers=[
"Development Status :: 3 - Alpha",
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
Expand Down
2 changes: 1 addition & 1 deletion websockets/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = '0.1'
version = '1.0'

0 comments on commit 1aa31d0

Please sign in to comment.