Skip to content

Commit 6a123a2

Browse files
committed
changing install.py description per command line
1 parent a14c069 commit 6a123a2

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

pyradio/config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1435,7 +1435,9 @@ def get_pyradio_version(self):
14351435
# if revision is not 0
14361436
git_description = ''
14371437
if git_description:
1438-
if git_description.endswith('-git'):
1438+
if git_description.endswith('-git') or \
1439+
git_description.endswith('-sng') or \
1440+
git_description.endswith('-dev'):
14391441
if 'rdev' in git_description:
14401442
''' failed to get it on linux '''
14411443
git_description = 'PyRadio-git'

pyradio/install.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,8 @@ def _do_it(self, mode='update'):
556556
return ret
557557

558558
def _change_git_discription_in_config_py(self):
559+
# print('\n\n_change_git_discription_in_config_py(): self._github_long_description = "{}"\n\n'.format(self._github_long_description))
560+
# logger.error('DE _change_git_discription_in_config_py(): self._github_long_description = "{}"'.format(self._github_long_description))
559561
''' change git_discription in pyradio/config.py '''
560562
if self._github_long_description is not None:
561563
try:
@@ -593,6 +595,14 @@ def _download_pyradio(self):
593595
sys.exit(1)
594596
with open(os.path.join(self._dir, self.ZIP_DIR[self._package], 'DEV'), 'w') as b:
595597
pass
598+
''' DEBUG
599+
get new install.py, copy.py (any py)
600+
into downloaded directory
601+
'''
602+
# from shutil import copyfile
603+
# cur_dir = os.getcwd()
604+
# copyfile('/home/spiros/projects/my-gits/pyradio/pyradio/install.py', os.path.join(cur_dir, 'install.py'))
605+
# copyfile('/home/spiros/projects/my-gits/pyradio/pyradio/config.py', os.path.join(cur_dir, 'config.py'))
596606

597607
def _mkdir(self, name, dir_exist_function=None, _permission_error_function=None):
598608
if os.path.isdir(name):
@@ -790,12 +800,14 @@ def _do_it(self, mode='update'):
790800
package = 1
791801
VERSION, github_long_description = get_github_long_description(use_sng_repo=True, sng_branch=True)
792802
github_long_description += '-sng'
803+
github_long_description = github_long_description.replace('-', '-r', 1)
793804
elif args.sng_devel:
794805
'''' sng devel '''
795806
args.force = True
796807
package = 2
797808
VERSION, github_long_description = get_github_long_description(use_sng_repo=True)
798809
github_long_description += '-sng-dev'
810+
github_long_description = github_long_description.replace('-', '-r', 1)
799811
elif args.devel:
800812
''' official devel '''
801813
package = 3

0 commit comments

Comments
 (0)