xyproto / setconf

:green_book: Change settings in configuration text files
https://setconf.roboticoverlords.org
GNU General Public License v2.0
46 stars 5 forks source link

These changes make it possible to upload setconf to pypi #4

Closed dmerejkowsky closed 8 years ago

dmerejkowsky commented 8 years ago

So that you can see what it looks like:

https://testpypi.python.org/pypi/setconf2/0.6.8

Registering your project on Pypi seems like a good idea, it would allow usage of setconf on other platforms (Mac, Windows ...)

Of course, if you are still willing to rewrite this project in go, feel free to ignore this pull request :)

dmerejkowsky commented 8 years ago

Aha. Looks like my last commit showed a bug in setconf: you are actually not compatible with python2.6:

Traceback (most recent call last):
  File "setconf.py", line 31, in <module>
    from subprocess import check_output
ImportError: cannot import name check_output

check_output was added in Python2.7, you'll need to re-implement it, or drop Python2.6 compatibly (your choice :)

xyproto commented 8 years ago

Thanks for the pull request. Will look at it.

Part of the reason for wanting to rewrite in Go is that there were issues changing ISO-8859-1 files when using setconf together with Python 3. I would like to move to a solution that cares more about bits and bytes and less about charsets, if possible. This should also be doable in Python, but Go already has the philosophy of reading, writing and dealing with bytes instead of chars whenever possible.

dmerejkowsky commented 8 years ago

Thanks for the pull request. Will look at it.

Thanks. If you need help on how to properly ulpoad to pypi I'll be glad to help.

I also thinks that dealing with ISO is possible both with Python2 and Python3, but yeah it can be tricky. I can take a look if you'd like

xyproto commented 8 years ago

Cherry picked the d28e2ea commit. Thank you!

dmerejkowsky commented 8 years ago

It seems you only registered setconf on Pypi, since there are no files to be downloaded: https://pypi.python.org/pypi/setconf

I suggest installing twine and wheel and then run

git clean -fdx
python2 setup.py sdist bdist_wheel
twine upload dist/*

twine is a better way of uploading stuff to Pypi, and having a wheel available will speed up install time for pip users

xyproto commented 8 years ago

Used the method you suggested. Thanks!

dmerejkowsky commented 8 years ago

Nice :) By the look on the Pypi page, looks like you don't need to rename the README after all.

Glad I could help