Skip to content

Commit 1aa31d0

Browse files
committed
Prepare packaging.
1 parent f63e880 commit 1aa31d0

File tree

7 files changed

+32
-16
lines changed

7 files changed

+32
-16
lines changed

.gitignore

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
*.pyc
2-
docs/_build
3-
README.html
42
.coverage
5-
htmlcov
6-
compliance/reports
73
.DS_Store
4+
build/
5+
compliance/reports/
6+
dist/
7+
docs/_build/
8+
htmlcov/
9+
MANIFEST
10+
README
11+
README.html
12+
websockets.egg-info/

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include INSTALL LICENSE README.rst requirements.txt
1+
include LICENSE

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ coverage:
99
clean:
1010
find . -name '*.pyc' -delete
1111
find . -name __pycache__ -delete
12-
rm -rf .coverage dist htmlcov MANIFEST
12+
rm -rf .coverage build compliance/reports dist docs/_build htmlcov MANIFEST README websockets.egg-info

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848
# built documents.
4949
#
5050
# The short X.Y version.
51-
version = '0.1'
51+
version = '1.0'
5252
# The full version, including alpha/beta/rc tags.
53-
release = '0.1'
53+
release = '1.0.0'
5454

5555
# The language for content autogenerated by Sphinx. Refer to documentation
5656
# for a list of supported languages.

requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

setup.py

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,31 @@
1-
import distutils.core
21
import os
2+
import sys
3+
import setuptools
34

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

7-
description = "An implementation of the WebSocket Protocol (RFC 6455)"
8-
98
root = os.path.dirname(__file__)
109

11-
with open(os.path.join(root, 'README.rst')) as f:
10+
# Prevent distutils from complaining that a standard file wasn't found
11+
README = os.path.join(root, 'README')
12+
if not os.path.exists(README):
13+
os.symlink(README + '.rst', README)
14+
15+
description = "An implementation of the WebSocket Protocol (RFC 6455)"
16+
17+
with open(os.path.join(root, 'README')) as f:
1218
long_description = '\n\n'.join(f.read().split('\n\n')[1:])
1319

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

17-
distutils.core.setup(
23+
py_version = sys.version_info[:2]
24+
25+
if py_version < (3, 3):
26+
raise Exception("websockets requires Python >= 3.3.")
27+
28+
setuptools.setup(
1829
name='websockets',
1930
version=version,
2031
author='Aymeric Augustin',
@@ -26,8 +37,9 @@
2637
packages=[
2738
'websockets',
2839
],
40+
install_requires=['asyncio'] if py_version == (3, 3) else [],
2941
classifiers=[
30-
"Development Status :: 3 - Alpha",
42+
"Development Status :: 5 - Production/Stable",
3143
"Environment :: Web Environment",
3244
"Intended Audience :: Developers",
3345
"License :: OSI Approved :: BSD License",

websockets/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = '0.1'
1+
version = '1.0'

0 commit comments

Comments
 (0)