Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow arbitrary filenames/templates in write_to #36

Closed
RonnyPfannschmidt opened this issue Jul 29, 2015 · 6 comments
Closed

allow arbitrary filenames/templates in write_to #36

RonnyPfannschmidt opened this issue Jul 29, 2015 · 6 comments
Assignees

Comments

@RonnyPfannschmidt
Copy link
Contributor

superseeds #33

there should be a way to allow the writing of arbitrary files/styles

an idea os to have a write_to_template that acompanies write_to and
just having defaults for the supported extensions

@prologic
Copy link

prologic commented Aug 2, 2015

👍 I'd like to be able to (for example) write out a package/version.py with the following contents:

version_info = (1, 0, 3)
version = "1.0.3"

@RonnyPfannschmidt
Copy link
Contributor Author

@prologic what is the version info needed for?

@prologic
Copy link

prologic commented Aug 2, 2015

A good idea at the time; hardly used; but to programatically compute/compare version numbers at runtime much liks sys.version_info tuple.

@RonnyPfannschmidt
Copy link
Contributor Author

@prologic

my general suggestion is to always use pkg_resources.parse_version of setuptools for that

while working with version numbers im detail it beame rather apparent that all other ways break under too many circumstances

for example its not clear how to encode dev/local versions, scm commit id's or date metadata for dirty workdirs

so on one side its practically impossible to sanely encode the metadata setuptools_scm will put into theversion as a tuple, on the other hand, Versions from pkg_resources are very comparable already

also using pkg_resources to check requirmements seems much more reliable than a self-hacked scheme

@prologic
Copy link

prologic commented Aug 2, 2015

Whilst I agree it could still be useful to be able to template out write_to even if it's used for such purposes to avoid re-parsing the version string each time.

@RonnyPfannschmidt
Copy link
Contributor Author

the general mechanism is implemented, for the detail i created a new issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants