From 03e4482186aebccfa677dd2eefca0c59b45dc323 Mon Sep 17 00:00:00 2001
From: Piotr Maslanka <piotr.maslanka@henrietta.com.pl>
Date: Mon, 23 Jan 2017 09:38:33 +0100
Subject: [PATCH] inited writing 2.0

---
 .codeclimate.yml | 20 +++++++++++++++++++
 .coveragerc      |  4 ++++
 .gitignore       |  2 +-
 .travis.yml      | 14 ++++++++++++++
 LICENSE          |  2 +-
 README.md        | 14 ++++++++++++++
 Vagrantfile      | 39 +++++++++++++++++++++++++++++++++++++
 setup.cfg        |  8 ++++++++
 setup.py         | 50 +++++++++++++++++++++++++++++++-----------------
 9 files changed, 133 insertions(+), 20 deletions(-)
 create mode 100644 .codeclimate.yml
 create mode 100644 .coveragerc
 create mode 100644 .travis.yml
 create mode 100644 Vagrantfile
 create mode 100644 setup.cfg

diff --git a/.codeclimate.yml b/.codeclimate.yml
new file mode 100644
index 00000000..9c2e3c1c
--- /dev/null
+++ b/.codeclimate.yml
@@ -0,0 +1,20 @@
+engines:
+  duplication:
+    enabled: true
+    config:
+      languages:
+        python:
+
+  fixme:
+    enabled: true
+  markdownlint:
+    enabled: true
+  pep8:
+    enabled: true
+  radon:
+    enabled: true
+exclude_paths:
+- tests/**
+ratings:
+  paths:
+  - satella/**
diff --git a/.coveragerc b/.coveragerc
new file mode 100644
index 00000000..456f6e02
--- /dev/null
+++ b/.coveragerc
@@ -0,0 +1,4 @@
+[run]
+branch=1
+include=satella/*
+omit=tests/*
diff --git a/.gitignore b/.gitignore
index 4b0cb63f..baa1b7c8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,7 +13,7 @@ tmp/
 *.bak
 *.swp
 *~.nib
-.idea/
+.idea/**
 local.properties
 .classpath
 .settings/
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000..7e162f9b
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,14 @@
+language: python
+python:
+ - "2.7"
+ - "3.3"
+ - "3.4"
+ - "3.5"
+ - "pypy"
+cache: pip
+script:
+ - nosetests --with-coverage
+install:
+ - pip install coverage
+ - pip install codeclimate-test-reporter
+ - pip install -r requirements.txt
diff --git a/LICENSE b/LICENSE
index 9a8ddcf2..1ff5ac18 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2013-2014 Piotr Maślanka
+Copyright (c) 2013-2017 Piotr Maślanka
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
diff --git a/README.md b/README.md
index 053205d7..1abfe13e 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,17 @@
+satella
+========
+[![Build Status](https://travis-ci.org/smok-serwis/satella.svg)](https://travis-ci.org/smok-serwis/satella)
+[![Code Climate](https://codeclimate.com/github/smok-serwis/satella/badges/gpa.svg)](https://codeclimate.com/github/smok-serwis/satella)
+[![Test Coverage](https://codeclimate.com/github/smok-serwis/satella/badges/coverage.svg)](https://codeclimate.com/github/smok-serwis/satella/coverage)
+[![license](https://img.shields.io/github/license/mashape/apistatus.svg)]()
+[![PyPI](https://img.shields.io/pypi/pyversions/satella.svg)]()
+[![PyPI](https://img.shields.io/pypi/implementation/satella.svg)]()
+
+**satella is currently undergoing a major rework. See branch satella2 for details.
+This WILL break compatibility.**
+
+**satella 1.0 remain in maintenance mode**
+
 Satella is a Python library for writing server applications, especially those dealing with
 small network-oriented tasks. Over time it will constitute a reasonably large library with useful things.
 
diff --git a/Vagrantfile b/Vagrantfile
new file mode 100644
index 00000000..f4e061cf
--- /dev/null
+++ b/Vagrantfile
@@ -0,0 +1,39 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+Vagrant.configure("2") do |config|
+
+  config.vm.box = "debian/contrib-jessie64"
+
+  # Rabbit MQ management
+  config.vm.network "forwarded_port", guest: 15672, host: 15672
+
+  # HTTP for viewing coverage reports
+  config.vm.network "forwarded_port", guest: 80, host: 8765
+
+  config.vm.provision "shell", inline: <<-SHELL
+     apt-get update
+
+     # Python
+     apt-get install -y htop curl python python-setuptools python-pip python-dev build-essential rabbitmq-server python3 python3-pip python3-setuptools
+     pip install --upgrade pip setuptools
+     pip3 install --upgrade pip setuptools
+
+     # Install deps
+     pip install -r /vagrant/requirements.txt
+     pip install nose coverage
+     pip3 install -r /vagrant/requirements.txt
+     pip3 install nose coverage
+
+     # HTTP server for viewing coverage reports
+    apt-get -y install nginx
+    rm -rf /var/www/html
+    ln -s /vagrant/htmlcov /var/www/html
+
+    # .bashrc for default user
+    echo """# .bashrc
+    cd /vagrant""" > /home/vagrant/.bashrc
+
+  SHELL
+
+end
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 00000000..cdd41f09
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,8 @@
+[metadata]
+description-file = README.md
+
+[pycodestyle]
+max-line-length=120
+
+[bdist_wheel]
+universal=1
diff --git a/setup.py b/setup.py
index f1ca3980..c3f248e8 100644
--- a/setup.py
+++ b/setup.py
@@ -1,20 +1,34 @@
-from distutils.core import setup
+# coding=UTF-8
+from setuptools import setup
 
 setup(name='satella',
-      version='1.0',
-      description='Network, concurrency, instrumentation for servers',
-      author='Piotr Maslanka',
-      author_email='piotr.maslanka@henrietta.com.pl',
-      url='https://www.github.com/piotrmaslanka/satella/',
-      packages=['satella',
-                'satella.unix',
-                'satella.channels',
-                'satella.channels.sockets',
-                'satella.contrib',
-                'satella.db',
-                'satella.db.pool',
-                'satella.instrumentation',
-                'satella.instrumentation.counters',
-                'satella.instrumentation.exctrack',
-                'satella.threads'],
-     )
\ No newline at end of file
+      version='1.9.0',
+      description=u'Utilities for writing servers in Python',
+      author=u'Piotr Maślanka',
+      author_email='piotrm@smok.co',
+      keywords=['ha', 'high availability', 'scalable', 'scalability', 'server'],
+      packages=[
+            'satella',
+      ],
+      install_requires=[
+            "six",
+            "monotonic",
+      ],
+      tests_require=[
+          "nose"
+      ],
+      test_suite='nose.collector',
+      classifiers=[
+            'Programming Language :: Python',
+            'Programming Language :: Python :: 3.3',
+            'Programming Language :: Python :: 3.4',
+            'Programming Language :: Python :: 3.5',
+            'Programming Language :: Python :: Implementation :: CPython',
+            'Programming Language :: Python :: Implementation :: PyPy',
+            'Operating System :: POSIX',
+            'Development Status :: 1 - Planning',
+            'License :: OSI Approved :: MIT License',
+            'Topic :: Software Development :: Libraries'
+
+      ]
+    )
-- 
GitLab