Skip to content

Conversation

wo0dyn
Copy link
Contributor

@wo0dyn wo0dyn commented Jan 16, 2017

Rationale

Since the version is set in setup.py, it's not available in formidable
module itself. I suggest to set the version in formidable/__init__.py
instead.

Since the version is set in `setup.py`, it's not available in formidable
module itself. I suggest to set the version in formidable/__init__.py
instead.
setup(
name='django-formidable',
version='0.6.0.dev0',
version=formidable.version,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will it work when installing the package on a fresh venv? can you really import your package before installing it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw this pattern several times, so I think it's safe.
Alternatively, we could use bumpversion package to dump the new version in both files.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember it was tricky to have the version in .py files ; that's the reason why we used to use VERSION files. But if it works, then go.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CircleCI didn't have an issue installing django-formidable using tox -r.
I'll revert this commit if it causes any issue.

@wo0dyn wo0dyn merged commit 9414da5 into master Jan 16, 2017
@wo0dyn wo0dyn deleted the expose-version branch January 16, 2017 13:42
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

Successfully merging this pull request may close these issues.

3 participants