Skip to content
This repository has been archived by the owner on Dec 28, 2024. It is now read-only.

Commit

Permalink
updates to pip install works
Browse files Browse the repository at this point in the history
  • Loading branch information
spencergibb committed Oct 2, 2013
1 parent d89ab44 commit 5234adc
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*.py[cod]
test/testconfig/cache
MANIFEST

# C extensions
*.so
Expand Down
4 changes: 4 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include README.md COPYING
include packaging/distutils/setup.py
recursive-include share *
include Makefile
42 changes: 42 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/make
# WARN: gmake syntax
########################################################
# Makefile for Battleschool
#
# useful targets:
# make sdist ---------------- produce a tarball

########################################################
# variable section

NAME = "battleschool"
OS = $(shell uname -s)

PYTHON=python
SITELIB = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")

# VERSION file provides one place to update the software version
VERSION := $(shell cat VERSION)

########################################################

all: clean python

clean:
@echo "Cleaning up distutils stuff"
rm -rf build
rm -rf dist
@echo "Cleaning up byte compiled python stuff"
find . -type f -regex ".*\.py[co]$$" -delete
@echo "Cleaning up editor backup files"
find . -type f \( -name "*~" -or -name "#*" \) -delete
find . -type f \( -name "*.swp" \) -delete

python:
$(PYTHON) setup.py build

install:
$(PYTHON) setup.py install

sdist: clean
$(PYTHON) setup.py sdist -t MANIFEST.in
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@

Development environment provisioning using ansible, ala boxen -> puppet, kitchenplan -> chef

### install

sudo pip install https://github.com/32degrees/battleschool/archive/v0.0.1.tar.gz


### remote source playbooks

Directory Layout
Expand All @@ -14,10 +19,12 @@ The top level of the directory would contain files and directories like so:
ux.yml # playbook for ux

roles/ # standard ansible role hierarchy
modules/ # remote module definitions
library/ # remote module definitions

TODO: Consolidated simple cli output
TODO: Polish cli output

TODO: Docs

TODO: Submit pip

TODO: Submit mac port
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.1
8 changes: 3 additions & 5 deletions lib/battleschool/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@ def get_config(env_var, default):
# correct location. See #1277 for discussion
if getattr(sys, "real_prefix", None):
DIST_MODULE_PATH = os.path.join(sys.prefix, 'share/battleschool/')
DIST_CONFIG_PATH = os.path.join(sys.prefix, 'etc/battleschool/')
else:
DIST_MODULE_PATH = '/usr/share/battleschool/'
DIST_CONFIG_PATH = '/etc/battleschool/'

DEFAULT_MODULE_PATH = get_config('BATTLESCHOOL_LIBRARY', DIST_MODULE_PATH)
DEFAULT_HOST_LIST = os.path.expanduser(get_config('BATTLESCHOOL_HOSTS', os.path.join(DIST_CONFIG_PATH, 'hosts')))
DEFAULT_PLAYBOOK = os.path.expanduser(get_config('BATTLESCHOOL_PLAYBOOK', os.path.join(DIST_MODULE_PATH, 'battleschool.yml')))
DEFAULT_MODULE_PATH = get_config('BATTLESCHOOL_LIBRARY', os.path.join(DIST_MODULE_PATH, 'library'))
DEFAULT_HOST_LIST = os.path.expanduser(get_config('BATTLESCHOOL_HOSTS', os.path.join(DIST_MODULE_PATH, 'defaults', 'hosts')))
DEFAULT_PLAYBOOK = os.path.expanduser(get_config('BATTLESCHOOL_PLAYBOOK', os.path.join(DIST_MODULE_PATH, 'defaults', 'battleschool.yml')))
DEFAULT_CALLBACK_PLUGIN_PATH = os.path.expanduser(get_config('BATTLESCHOOL_CALLBACK_PLUGINS', os.path.join(DIST_MODULE_PATH, 'callback_plugins')))

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

setup(name='battleschool',
version=__version__,
description='Radically simple IT automation',
description='simple dev box provisioning',
author=__author__,
author_email='spencer@32degre.es',
url='http://32degre.es',
Expand Down
11 changes: 11 additions & 0 deletions share/defaults/battleschool.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
- hosts: workstation
vars_files:
- ~/.battleschool/config.yml

tasks:
- name: print from playbook
debug: msg="in battleschool.yml"

#- include: {{item}}
# with_items: playbooks
2 changes: 2 additions & 0 deletions share/defaults/hosts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[workstation]
localhost ansible_connection=local

0 comments on commit 5234adc

Please sign in to comment.