def createProjectStructure(self): p = SAMPLE_PROJECT_STRUCTURE if question.yn('''Do you want me to create the package structure for you? This would include... %s''' %p.tree() ): #create new package folder c= PathStr(os.curdir) cp = c.parentDir() new_project_folder = p.copy(cp.join( incrementName( cp.listdir(), p.basename()+'_master') ) ) #copy curent dir into new package folder #TODO: geht nicht // nicht mehr mit upwars als testproj arbeiten sondern mit tests c.copy(new_project_folder)
def initPypi(self): c = {} c['enabled'] = question.yn('''Do you want to share your project on PyPI (https://pypi.python.org)''') if c['enabled']: if question.yn('''Do you allow me to create/modify the PyPI ressource file '.pypirc' located in your home directory? (see https://docs.python.org/2/distutils/packageindex.html#pypirc)''', True): pypyrc = ConfigObj() pypyrc.filename = PathStr.home().join('.pypirc') pypyrc['distutils'] = {'index-servers':['pypi','test']} if not question.yn('''Do you have a PyPI account?'''):#want to save your login details for PyPI in ~/.pypirc raw_input('''Than... --> go now to https://pypi.python.org and create one. --> press any key to continue''') print('please type in your PyPI ...') username = raw_input('username: '******'password: '******'pypi'] = {'repository':'https://pypi.python.org/pypi', 'username':username, 'password':password} if not question.yn('''Do you have a PyPI-test server account?'''):#want to save your login details for PyPI in ~/.pypirc raw_input('''Than... --> go now to https://testpypi.python.org/pypi and create one. --> press any key to continue''') print('please type in your PyPI-test server ...') username = raw_input('username: '******'password: '******'test'] = {'repository':'https://testpypi.python.org/pypi', 'username':username, 'password':password} pypyrc.write() config['PyPI'] = c
include_package_data=True, scripts=[] if not os.path.exists('bin') else [os.path.join('bin', x) for x in os.listdir('bin')], long_description=(read('README.rst') + '\n\n' + read('CHANGES.rst') + '\n\n' + read('AUTHORS.rst')), ) # LAUNCHER NEEDS SOME WORK - UNTIL THATS DONE: DONT RUN THE FOLLOWING INSTALL_QDESIGNER_STARTER = False if INSTALL_QDESIGNER_STARTER: if 'install' in sys.argv: while True: answer = raw_input( 'Do you want to a start menu entry for the QDesigner with included fancyWidgets plugins? [Y,N] ' ) if answer.lower() in ('y', 'n', ''): break print("Please answer with 'Y' or 'N'") if answer == 'Y': from fancytools.os import PathStr, StartMenuEntry prog_path = PathStr(sys.executable).dirname().join( 'Scripts', 'fwdesigner.pyw') print('create start menu entry for Fw_QtDesigner located in %s' % prog_path) StartMenuEntry('Fw_QtDesigner', prog_path).create()