1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194
|
DEFAULT_DATA_PATH = ".releaseforge"
RELEASEFORGE_CONFIG_FILENAME = "releaseforge.cfg"
PROJECTS_FILENAME = "projects"
ADDRESS_BOOK_FILENAME = "address_book"
FM_PROJECTS_FILENAME = "projects.fm"
LOGIN_FILENAME = "login"
SF_COOKIE_FILENAME = 'cookies.sf'
FM_XMLRPC = "http://freshmeat.net/xmlrpc/"
SOCKET_TIMEOUT = 60.0
SF_RESPONSE_CHUNK_SIZE = 4 * 1024
LOGGER_CONFIG_FILENAME = "logger.ini"
SF_FTP_SERVER = "upload.sourceforge.net"
SF_FTP_DIRECTORY = "incoming"
SF_WARNING = """
The follwing files could not be added to your release
because their names must be unique for a given project:
%s
In order to add these files to this release you must
remove them from a previous release. Alternatively,
you can rename the files and edit this release.
If there were other files added to this release that
were not mentioned above then they have been successfully
added to this release.
"""
# custom event ids
EVENT_LOGIN = 10000
EVENT_STATUS = 10001
EVENT_UPDATE_PROJECT = 10002
EVENT_ADD_PACKAGE = 10003
EVENT_UPDATE_PACKAGE = 10004
EVENT_REFRESH_PACKAGES = 10005
EVENT_CREATE_RELEASE = 10006
EVENT_UPLOAD_FILES = 10007
EVENT_EDIT_RELEASE_1 = 10008
EVENT_EDIT_RELEASE_2 = 10009
EVENT_EDIT_RELEASE_3 = 10010
EVENT_EDIT_RELEASE_4 = 10011
EVENT_GET_RELEASES = 10012
EVENT_RELEASE_FETCHED = 10013
EVENT_DELETE_FILES = 10014
EVENT_NEWS_SUBMITTED = 10015
EVENT_FTP_PROGRESS = 10016
EVENT_FTP_COMPLETE = 10017
EVENT_SEND_EMAIL = 10018
EVENT_RELEASE_STATUS = 10019
EVENT_RELEASE_UPDATED = 10020
# page numbers of the releaseWizard
WIZARD_PAGE_EDIT_RELEASE = 0
WIZARD_PAGE_RELEASE_NAME = 1
WIZARD_PAGE_FILE_SELECTION = 2
WIZARD_PAGE_PROGRESS = 3
WIZARD_HELP_PAGES = {
WIZARD_PAGE_EDIT_RELEASE: ('', 'edit_release.html'),
WIZARD_PAGE_RELEASE_NAME: ('new_release.html', 'edit_release_details.html'),
WIZARD_PAGE_FILE_SELECTION: ('file_selection.html', 'edit_release_files.html'),
WIZARD_PAGE_PROGRESS: ('progress.html', 'progress.html')
}
EMAIL_PAGE_SELECT = 0
EMAIL_PAGE_COMPOSE = 1
EMAIL_PAGE_CONFIRM = 2
EMAIL_PAGE_PROGRESS = 3
# mappings of file type names to their SF id's
FILE_TYPE = {
'.deb': '1000',
'.rpm': '2000',
'.zip': '3000',
'.bz2': '3001',
'.gz': '3002',
'Source .zip': '5000',
'Source .bz2': '5001',
'Source .gz': '5002',
'Source .rpm': '5100',
'Other Source File': '5900',
'.jpg': '8000',
'text': '8001',
'html': '8002',
'pdf': '8003',
'Other': '9999',
'.sit': '3003',
'.nbz': '3004',
'.exe (DOS)': '2500',
'.exe (16-bit Windows)': '2501',
'.exe (32-bit Windows)': '2502',
'.exe (OS/2)': '2600',
'.dmg': '3005',
'.jar': '2601',
'Source Patch/Diff': '5901',
'.prc (PalmOS)': '2700',
'.iso': '3006',
'Source .Z': '5003',
'.bin (MacBinary)': '2650',
'.ps (PostScript)': '8004',
'.msi (Windows Installer)': '2503',
'Other Binary Package': '4000'
}
# mappings of guessing file extentions to their names (in the previous hash)
FILE_TYPE_GUESS = {
'.deb': '.deb',
'.rpm': '.rpm',
'.zip': '.zip',
'.bz2': '.bz2',
'.bz': '.bz2',
'.gz': '.gz',
'.tgz': '.gz',
'.tar.gz': '.gz',
'.src.zip': 'Source .zip',
'.src.bz2': 'Source .bz2',
'.src.bz': 'Source .bz2',
'.src.tar.gz': 'Source .gz',
'.src.tgz': 'Source .gz',
'.src.rpm': 'Source .rpm',
'.jpeg': '.jpg',
'.jpg': '.jpg',
'.text': 'text',
'.txt': 'text',
'.html': 'html',
'.htm': 'html',
'.pdf': 'pdf',
'.sit': '.sit',
'.nbz': '.nbz',
'.exe': '.exe (32-bit Windows)',
'.win32.exe': '.exe (32-bit Windows)',
'.win16.exe': '.exe (16-bit Windows)',
'.dos.exe': '.exe (DOS)',
'.os2.exe': '.exe (OS/2)',
'.dmg': '.dmg',
'.jar': '.jar',
'.diff': 'Source Patch/Diff',
'.prc': '.prc (PalmOS)',
'.iso': '.iso',
'.Z': 'Source .Z',
'.bin': '.bin (MacBinary)',
'.ps': '.ps (PostScript)',
'.msi': '.msi (Windows Installer)'
}
# mappings of processor to their SF id's
CPU = {'i386': '1000',
'IA64': '6000',
'Alpha': '7000',
'Any': '8000',
'PPC': '2000',
'MIPS': '3000',
'Sparc': '4000',
'UltraSparc': '5000',
'Other': '9999',
'Platform-Independent': '8500',
'ARM': '3001',
'SH3': '3002',
'AMD64': '6001',
'PPC64': '2001'}
CPU_GUESS = {
# explicit types
'i386': 'i386',
'i586': 'i386',
'i686': 'i386',
'ia64': 'IA64',
'alpha': 'Alpha',
'ppc': 'PPC',
'mips': 'MIPS',
'sparc': 'Sparc',
'arm': 'ARM',
'sh3': 'SH3',
'amd64': 'AMD64',
'x86_64': 'AMD64',
'ppc64': 'PPC64',
# implict types
'x86': 'i386',
'src': 'Platform-Independent',
'exe': 'i386',
'win16': 'i386',
'win32': 'i386',
'dos': 'i386',
'tgz': 'Platform-Independent',
'bz2': 'Platform-Independent',
'tar': 'Platform-Independent',
'noarch': 'Platform-Independent'}
|