fix: cleanup some code for wutta project template
even though cookiecutter-wuttaweb is the preferred approach now
This commit is contained in:
		
							parent
							
								
									6bd9f17ba6
								
							
						
					
					
						commit
						eacc8417ab
					
				
					 2 changed files with 8 additions and 13 deletions
				
			
		| 
						 | 
				
			
			@ -10,25 +10,21 @@ import shutil
 | 
			
		|||
from invoke import task
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
here = os.path.abspath(os.path.dirname(__file__))
 | 
			
		||||
exec(open(os.path.join(here, '${pkg_name}', '_version.py')).read())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@task
 | 
			
		||||
def release(c):
 | 
			
		||||
    """
 | 
			
		||||
    Release a new version of ${name}
 | 
			
		||||
    """
 | 
			
		||||
    # rebuild local tar.gz file for distribution
 | 
			
		||||
 | 
			
		||||
    if os.path.exists('dist'):
 | 
			
		||||
        shutil.rmtree('dist')
 | 
			
		||||
    if os.path.exists('${egg_name}.egg-info'):
 | 
			
		||||
        shutil.rmtree('${egg_name}.egg-info')
 | 
			
		||||
 | 
			
		||||
    c.run('python -m build --sdist')
 | 
			
		||||
 | 
			
		||||
    # filename of built package
 | 
			
		||||
    filename = '${pypi_name}-{}.tar.gz'.format(__version__)
 | 
			
		||||
 | 
			
		||||
    # TODO: uncomment and update these details, to upload to private PyPI
 | 
			
		||||
    #c.run('scp dist/{} rattail@pypi.example.com:/srv/pypi/${folder}/'.format(filename))
 | 
			
		||||
    #c.run('scp dist/* myuser@pypi.example.com:/srv/pypi/${folder}/')
 | 
			
		||||
 | 
			
		||||
    # TODO: or, uncomment this to upload to *public* PyPI
 | 
			
		||||
    #c.run('twine upload dist/{}'.format(filename))
 | 
			
		||||
    # TODO: or, uncomment this to upload to public PyPI
 | 
			
		||||
    #c.run('twine upload dist/*')
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -51,8 +51,7 @@ class WuttaProjectGenerator(PythonProjectGenerator):
 | 
			
		|||
 | 
			
		||||
        # dependencies
 | 
			
		||||
        context['requires'].setdefault('psycopg2', True)
 | 
			
		||||
        context['requires'].setdefault('Wutta-Continuum', True)
 | 
			
		||||
        context['requires'].setdefault('WuttaWeb', True)
 | 
			
		||||
        context['requires'].setdefault('WuttaWeb[continuum]', True)
 | 
			
		||||
 | 
			
		||||
        # entry point for config extension
 | 
			
		||||
        context['entry_points'].setdefault('wutta.config.extensions', []).extend([
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue