Comments (3)
I see this can only be changed in cookiecutter itself as the hook is run from inside the new-project dir. For vcs templates one could find the path to the template repo with something like this
user_config_data = config.get_user_config()
repo_url = '{{ cookiecutter._template }}'
clone_to_dir = user_config_data['cookiecutters_dir']
print("repo url {}".format(repo_url))
if repository.is_repo_url(repo_url):
repo_type, repo_url = vcs.identify_repo(repo_url)
tail = os.path.split(repo_url)[1]
if repo_type == 'git':
repo_dir = "{}/{}".format(clone_to_dir,os.path.normpath(os.path.join(clone_to_dir, tail.rsplit('.git')[0])))
elif repo_type == 'hg':
repo_dir = "{}/{}".format(clone_to_dir, os.path.normpath(os.path.join(clone_to_dir, tail)))
but for non vcs templates I don't find a way to get an absolute path to the template directory
from py-generic-project.
The license stuff relies on patches I wasn't able to place upstream at the time. I guess I should take a look at it again, given the current code bases.
from py-generic-project.
actually I thought of a different approach. put the licenese folder inside the repo template as licenses.in then copy from there and delete licenses.in afterwards
this should work and eliminate any need for changes in cookiecutter
from py-generic-project.
Related Issues (20)
- Try to use 'pip.req' for parsing if available
- Add feature options
- Release py-generic-project 1.4
- Add Sphinx documentation
- Write a 'project.d/cookiecutter.rc' file
- Add bash completion to CLI stub
- Add flask stub app (as a feature)
- Python installation / deployment details
- Add Python3 support to .env script
- Add coveralls to archetype + projects
- Put all metadata into __about__.py
- .env update
- Consider βlayeredβ approach
- invoke dependencies HOT 1
- setuptools version in .env
- Integrate Travis-CI-Python-on-three-OSes
- Add support for license choices HOT 2
- Change license to MIT for the template?! HOT 1
- Add pylint etc. to tool references
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from py-generic-project.