This repository was archived by the owner on Oct 24, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +22
-5
lines changed Expand file tree Collapse file tree 3 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,6 @@ include *.hpp
33include *.cpp
44include Makefile.am
55include win32/*.h
6- include test/*.sass
6+ include test/*.scss
77include sass2scss/sass2scss.*
88include README.rst
Original file line number Diff line number Diff line change 11Changelog
22=========
33
4- Bleeding Edge: 0.4.2-cd3ee1cbe3
5- -------------------------------
4+ Bleeding Edge: 0.4.2-YYYYMMDD- cd3ee1cbe3
5+ ----------------------------------------
66
77To be released.
88
Original file line number Diff line number Diff line change 1111import shutil
1212import sys
1313import tempfile
14+ import time
1415
1516try :
1617 from setuptools import Extension , setup
@@ -99,6 +100,22 @@ def version(sass_filename='sass.py'):
99100 return node .value .s
100101
101102
103+ def current_branch ():
104+ if os .path .isdir ('.git' ):
105+ try :
106+ with os .popen ('git branch' ) as f :
107+ for line in f :
108+ line = line .strip ()
109+ if line .startswith ('*' ):
110+ return line .split ()[1 ]
111+ except (IOError , OSError ):
112+ pass
113+ return
114+
115+
116+ unstable = current_branch () == 'unstable'
117+
118+
102119def readme ():
103120 try :
104121 with open (os .path .join (os .path .dirname (__file__ ), 'README.rst' )) as f :
@@ -136,11 +153,11 @@ def run(self):
136153
137154
138155setup (
139- name = 'libsass' ,
156+ name = 'libsass' + ( '-unstable' if unstable else '' ) ,
140157 description = 'SASS for Python: '
141158 'A straightforward binding of libsass for Python.' ,
142159 long_description = readme (),
143- version = version (),
160+ version = version () + ( time . strftime ( '-%Y%m%d' ) if unstable else '' ) ,
144161 ext_modules = [sass_extension ],
145162 packages = ['sassutils' ],
146163 py_modules = ['sass' , 'sassc' , 'sasstests' ],
You can’t perform that action at this time.
0 commit comments