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

Doesn't work well when package name doesn't match module name #48

Merged
merged 12 commits into from
Nov 15, 2013

Conversation

michaeljoseph
Copy link
Owner

Great tool! I'm running into this problem though.
Package name is django-clickbank but module is django_clickbank.

Sureiya/django-clickbank@e671358

(django_clickbank)kin@boxed-xawesome:~/Work/repositories/django-clickbank$ changes --tox django_clickbank install
What is the release version for "django_clickbank" [Default: 0.1.2]: 
warning: sdist: standard file not found: should have one of README, README.rst, README.txt

Cannot find sdist dist/django_clickbank-0.1.2.tar.gz
INFO:changes.cli:Successfully installed django_clickbank sdist

@michaeljoseph
Copy link
Owner

Ditto #49.

@michaeljoseph
Copy link
Owner

Thanks for the issue :)

@coveralls
Copy link

Coverage Status

Coverage increased (+0.26%) when pulling 7c59ed0 on support-package-module-mismatch into da05d41 on master.

@Sureiya
Copy link
Contributor Author

Sureiya commented Nov 15, 2013

I guess that works! Thanks.

@michaeljoseph
Copy link
Owner

Ugh, it's still not right though.

@Sureiya
Copy link
Contributor Author

Sureiya commented Nov 15, 2013

I unfortunately still haven't been able to get this version to run at all. Its stalling on updating the version.
I just end up with

__version__ = ''
__url__ = ''

@michaeljoseph
Copy link
Owner

Ok, I'll fix up and test with your project.

@Sureiya
Copy link
Contributor Author

Sureiya commented Nov 15, 2013

Either way, I think it makes more sense for app_name to be renamed module_name.

# django_clickbank/ __init__.py
...
__package_name__ = 'django-clickbank'

# Changes

package_name = getattr(arguments['--package-name'], django_clickbank.__package_name__)

Or perhaps the order could be --package-name > package_name > <module_name>/<app_name>

@michaeljoseph
Copy link
Owner

Yeah, I actually think the best solution for this is to make them the same in your project 😉

@michaeljoseph
Copy link
Owner

djlickbank

@Sureiya
Copy link
Contributor Author

Sureiya commented Nov 15, 2013

I only say that, because different module and package names are pretty common. And the naming convention for django projects is django-

@coveralls
Copy link

Coverage Status

Coverage increased (+0.16%) when pulling 70c9311 on support-package-module-mismatch into e42c815 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.16%) when pulling 70c9311 on support-package-module-mismatch into e42c815 on master.

Specify an alternate requirements file
@coveralls
Copy link

Coverage Status

Coverage increased (+0.42%) when pulling d693c3c on support-package-module-mismatch into e42c815 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.42%) when pulling 9479f76 on support-package-module-mismatch into e42c815 on master.

@michaeljoseph
Copy link
Owner

Looking hopeful:

± michael at mathematical in .../django-clickbank using virtualenv: django-clickbank on master:36e64 ✓
$ pip install -U ../changes; changes --tox --requirements=test-requirements.txt --package-name=django-clickbank django_clickbank install 
Unpacking /Users/michael/Source/changes
...
Successfully installed changes
Cleaning up...
INFO:changes.probe:Checking project for changes requirements.
INFO:changes.probe:On Github? True
INFO:changes.probe:setup.py? True
INFO:changes.probe:test-requirements.txt? True
INFO:changes.probe:Runs tests? True
INFO:changes.probe:CHANGELOG.md? True
INFO:changes.probe:Has module metadata? True
What is the release version for "django_clickbank" [Default: 0.1.4]: 
INFO:changes.packaging:Successfully installed django_clickbank sdist
INFO:changes.packaging:Successfully ran test command: None

@coveralls
Copy link

Coverage Status

Coverage increased (+0.42%) when pulling beffa15 on support-package-module-mismatch into e42c815 on master.

@michaeljoseph
Copy link
Owner

Claiming victory, let me know please @Sureiya.

michaeljoseph added a commit that referenced this pull request Nov 15, 2013
…atch

Doesn't work well when package name doesn't match module name
@michaeljoseph michaeljoseph merged commit a74d1a6 into master Nov 15, 2013
@michaeljoseph michaeljoseph deleted the support-package-module-mismatch branch November 15, 2013 19:34
@Sureiya
Copy link
Contributor Author

Sureiya commented Nov 18, 2013

Thanks, its working now. Its pausing on pushing tags though. How does sh need an explicit interactive mode? I think its failing because I'm using git http without any kind of autologin, so its basically freezing on auth without any output. I'm not sure if thats possible or easy to fix, so you may want to add to the docs that you need to be using ssh for git.

@michaeljoseph
Copy link
Owner

Please paste me what happens when you try to install with the latest version?

@michaeljoseph
Copy link
Owner

I can work on reproducing your use-case, but I'll definitely add that assumption to the docs. Thanks for contributing :)

michaeljoseph added a commit that referenced this pull request Oct 15, 2017
…atch

Doesn't work well when package name doesn't match module name
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.

None yet

3 participants