Pārlūkot izejas kodu

Merge branch 'develop' of https://github.com/pwman3/pwman3 into develop

oz123 9 gadi atpakaļ
vecāks
revīzija
43ada855e8
6 mainītis faili ar 20 papildinājumiem un 8 dzēšanām
  1. 4 1
      docs/general_notes.txt
  2. 3 3
      docs/source/install.rst
  3. 1 1
      pwman/__init__.py
  4. 3 1
      pwman/ui/cli.py
  5. 2 2
      pwman/ui/tools.py
  6. 7 0
      setup.py

+ 4 - 1
docs/general_notes.txt

@@ -59,9 +59,12 @@ finally you should step into:
   2. Make new passwords according to user defined rules. 
 
 # build the package with 
+
   python setup.py sdist
+
 # upload  
-  python setup.py sdist upload
+  
+  twine upload dist/pwman.tar.gz
 
 # PyCrypto Alternatives:
 

+ 3 - 3
docs/source/install.rst

@@ -16,15 +16,15 @@ the latest version of pwman3.
 Upgrading from version 0.5.x
 ----------------------------
 
-If you used the 0.5.x Tversion of ``pwman3`` your database is not compatible
-with the new 0.6.x version of ``pwman3``. You need to export your database
+If you used the 0.5.x version of ``pwman3`` your database is not compatible
+with the new 0.6.x and later versions of ``pwman3``. You need to export your database
 to a CSV from version 0.5.3 with::
 
     pwman> export 
 
 See ``help export`` when running pwman3 in version 0.5.3. 
 Once exported you should rename your old database, to keep a backup of it.
-Then you can install pwman3 in version 0.6.x as described above. When finished
+Then you can install pwman3 in version 0.6.x or later as described above. When finished
 you can import your passwords from the CSV to a new database with::
 
     $ pwman3 -i path_to_your_file.csv

+ 1 - 1
pwman/__init__.py

@@ -92,7 +92,7 @@ def set_xsel(configp, OSX):
 
 
 def set_win_colors(config):  # pragma: no cover
-    if 'win' in sys.platform:
+    if sys.platform.startswith('win'):
         colorama.init()
 
 

+ 3 - 1
pwman/ui/cli.py

@@ -28,7 +28,9 @@ try:
     import readline
     _readline_available = True
 except ImportError as e:  # pragma: no cover
-    _readline_available = False
+    import pyreadline as readline
+    _readline_available = True
+
 
 from pwman.ui.baseui import BaseCommands
 from pwman import (get_conf_options, get_db_version, version, appname,

+ 2 - 2
pwman/ui/tools.py

@@ -36,14 +36,14 @@ from pwman.util.crypto_engine import generate_password
 if sys.version_info.major > 2:  # pragma: no cover
     raw_input = input
 
-if sys.platform != 'win32':
+if not sys.platform.startswith('win'):
     import termios
     import fcntl
     import readline
     _readline_available = True
 else:  # pragma: no cover
     try:
-        import readline
+        import pyreadline
         _readline_available = True
     except ImportError as e:
         _readline_available = False

+ 7 - 0
setup.py

@@ -318,6 +318,13 @@ class PyCryptoInstallCommand(install):
                    'to install pycrypto ...'))
 
 
+install_requires=['pycrypto>=2.6',
+                'colorama>=0.2.4'],
+
+if sys.platform.startswith('win'):
+    install_requires.append('pyreadeline')
+
+
 setup(name=pwman.appname,
       version=pwman.version,
       description=pwman.description,