1. hideki nara
  2. bitinit

Commits

hideki nara  committed a0a3b4a

bitbucket.org is default, but can be chaned at conf.yml

  • Participants
  • Parent commits fe12988
  • Branches default

Comments (0)

Files changed (4)

File conf.yml

View file
 mail_domain  : hdknr.com
 company :   Lafoglia,Inc
 year : 2012
+host:bitbucket.org

File profiles/django_project/setup.py

View file
 
 import sys
 import os
+import glob
 sys.path.insert(0, os.path.abspath('src'))
 
 from setuptools import setup
 NAME='{{ project}}'
 DESCRIPTION=''
 PACKAGES=['{{ project }}',]
-SCRIPTS=[ ]
+SCRIPTS=glob.glob('src/scripts/*.py')
 try:
     INSTALL_REQUIRES=[ r for r in open('requirements.txt').read().split('\n') if len(r)>0]
 except:
         author_email = '{{ mail_user}} [at] {{ mail_domain }}',
         maintainer = '{{ fullname }}',
         maintainer_email = '{{ mail_user}} [at] {{ mail_domain }}',
-        url = 'https://bitbucket.org/hdknr/{{ project }}',
+        url = 'https://{{ host }}/{{ name }}/{{ project }}',
         description = '{{ project }} is a Django based management interface for databases.',
         long_description = read('README'),
-        download_url = 'https://bitbucket.org/hdknr/{{ project }}',
+        download_url = 'https://{{ host }}/{{ name }}/{{ project }}',
         platforms=['any'],
         classifiers = [
             'Development Status :: 4 - Beta',

File profiles/library/setup.py

View file
 
 import sys
 import os
+import glob
 sys.path.insert(0, os.path.abspath('src'))
 
 from setuptools import setup
 NAME='{{ project}}'
 DESCRIPTION=''
 PACKAGES=['{{ project }}',]
-SCRIPTS=[ ]
+SCRIPTS= glob.glob('src/scripts/*.py')
 try:
     INSTALL_REQUIRES=[ r for r in open('requirements.txt').read().split('\n') if len(r)>0]
 except:
         author_email = '{{ mail_user}} [at] {{ mail_domain }}',
         maintainer = '{{ fullname }}',
         maintainer_email = '{{ mail_user}} [at] {{ mail_domain }}',
-        url = 'https://bitbucket.org/hdknr/{{ project }}',
+        url = 'https://{{ host }}/{{ name }}/{{ project }}',
         description = '{{ project }} is a _______________________.',
         long_description = read('README'),
-        download_url = 'https://bitbucket.org/hdknr/{{ project }}',
+        download_url = 'https://{{ host }}/{{ name }}/{{ project }}',
         platforms=['any'],
         classifiers = [
             'Development Status :: 4 - Beta',

File src/scripts/bitinit.py

View file
     conf = yaml.load( open(DEF_CONF).read() ) 
     #TODO
     #  - distribute profiles with setup.py
+    if conf.has_key('host') == False:
+        conf['host'] = 'bitbucket.org'
     
     DEF_PROFILE=os.path.join(BASE,"profiles/%(profile)s"%conf )