-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Virtstrap Basic Template with paster
- Loading branch information
Reuven V. Gonzales
committed
Jul 15, 2011
1 parent
61055b9
commit 8db31f2
Showing
11 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[buildout] | ||
parts = python | ||
|
||
[python] | ||
recipe = zc.recipe.egg | ||
interpreter = python | ||
eggs = |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
echo "hello world ************************************" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"package_name": "virtbootstrap", | ||
"env_types": ["pip", "buildout", "shell_script"], | ||
"shell_script_file": "test.sh", | ||
"pip_requirements_file": "requirements.txt" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
""" | ||
VirtStrap | ||
========= | ||
A bootstrapping mechanism for virtualenv, buildout, and shell scripts. | ||
""" | ||
from setuptools import setup, find_packages | ||
|
||
setup( | ||
name="VirtStrap", | ||
version="0.1", | ||
license="MIT", | ||
author="Reuven V. Gonzales", | ||
url="http://tobetter.us", | ||
author_email="reuven@tobetter.us", | ||
description="A simple boostrapping mechanism for virtualenv, buildout and shell scripts", | ||
packages=find_packages(exclude=['tests', 'tests.*']), | ||
zip_safe=False, | ||
platforms='*nix', | ||
install_requires=[ | ||
"PasteScript>=1.3", | ||
], | ||
entry_points=""" | ||
[paste.paster_create_template] | ||
virtstrap_basic = virtstrap.entry.template:VirtStrapBasicTemplate | ||
""", | ||
classifiers = [ | ||
'License :: OSI Approved :: MIT License', | ||
'Intended Audience :: Developers', | ||
'Operating System :: OS Independent', | ||
'Programming Language :: Python', | ||
], | ||
) | ||
|
||
|
||
|
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import shutil | ||
import os | ||
from paste.script import templates | ||
|
||
VIRTSTRAP_PY_FILENAME = "virtstrap.py" | ||
VIRTSTRAP_PY_SRC_ROOT = "../" | ||
|
||
class VirtStrapTemplateBase(templates.Template): | ||
def write_files(self, command, output_dir, vars): | ||
super(VirtStrapTemplateBase, self).write_files(command, | ||
output_dir, vars) | ||
|
||
print "Creating {0} file for virtstrapping".format( | ||
VIRTSTRAP_PY_FILENAME) | ||
|
||
#Get directory for current file | ||
file_directory = os.path.abspath(os.path.dirname(__file__)) | ||
#Calculate source directory | ||
virtstrap_src = os.path.join(file_directory, VIRTSTRAP_PY_SRC_ROOT, | ||
VIRTSTRAP_PY_FILENAME) | ||
#Calculate destination directory | ||
virtstrap_dest = os.path.join(output_dir, VIRTSTRAP_PY_FILENAME) | ||
|
||
#Copy the current virtstrap.py file into the new project | ||
shutil.copyfile(virtstrap_src, virtstrap_dest) | ||
|
||
class VirtStrapBasicTemplate(VirtStrapTemplateBase): | ||
|
||
summary = "Creates a basic virtstrapped project" | ||
required_templates = ['basic_package'] | ||
_template_dir = "../templates/basic/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Flask==0.7.2 | ||
ipython |
Empty file.
Empty file.