Skip to content

Commit

Permalink
Some more package rename changes
Browse files Browse the repository at this point in the history
Updated `MANIFEST.in` to include the new package name.

Fixed some comments referring to the old package names.

Removed `package_dir` from `setup.py`, it is not necessary anymore.
  • Loading branch information
EchterAgo authored and cculianu committed Oct 18, 2020
1 parent 666b243 commit e4f6887
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 16 deletions.
7 changes: 3 additions & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ include *.py
include electron-cash
include contrib/requirements/requirements.txt
include contrib/requirements/requirements-hw.txt
recursive-include lib *.py
recursive-include gui *.py
recursive-include plugins *.py
recursive-include electroncash *.py
recursive-include electroncash_gui *.py
recursive-include electroncash_plugins *.py
recursive-include packages *.py
recursive-include packages cacert.pem
include icons.qrc
recursive-include icons *
recursive-include scripts *

Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fun toSatoshis(s: String, places: Int = unitPlaces) : Long {
}
}

// We use Locale.US to be consistent with lib/exchange_rate.py, which is also locale-insensitive.
// We use Locale.US to be consistent with electroncash/exchange_rate.py, which is also locale-insensitive.
@JvmOverloads // For data binding call in address_list.xml.
fun formatSatoshis(amount: Long, places: Int = unitPlaces): String {
val unit = Math.pow(10.0, places.toDouble())
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/res/values/donottranslate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<string name="default_bip39_derivation">m/44\'/145\'/0\'</string>

<!-- See lib/paymentrequest.py. -->
<!-- See electroncash/paymentrequest.py. -->
<string-array name="payment_status">
<item>@string/pending</item>
<item>@string/expired</item>
Expand Down
2 changes: 1 addition & 1 deletion electroncash/paymentrequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
try:
from . import paymentrequest_pb2 as pb2
except ImportError:
sys.exit("Error: could not find paymentrequest_pb2.py. Create it with 'protoc --proto_path=lib/ --python_out=lib/ lib/paymentrequest.proto'")
sys.exit("Error: could not find paymentrequest_pb2.py. Create it with 'protoc --proto_path=electroncash/ --python_out=electroncash/ electroncash/paymentrequest.proto'")

from . import bitcoin
from . import version
Expand Down
2 changes: 1 addition & 1 deletion electroncash/secp256k1.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
def _load_library():
if sys.platform == 'darwin':
library_paths = ('libsecp256k1.0.dylib', # on Mac it's in the pyinstaller top level folder, which is in libpath
os.path.join(os.path.dirname(__file__), 'libsecp256k1.0.dylib')) # fall back to "running from source" mode lib/ folder
os.path.join(os.path.dirname(__file__), 'libsecp256k1.0.dylib')) # fall back to "running from source" mode electroncash/ folder
elif sys.platform in ('windows', 'win32'):
library_paths = ('libsecp256k1-0.dll', # on Windows it's in the pyinstaller top level folder, which is in the path
os.path.join(os.path.dirname(__file__), 'libsecp256k1-0.dll')) # does running from source even make sense on Windows? Enquiring minds want to know.
Expand Down
2 changes: 1 addition & 1 deletion electroncash/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,7 @@ def tx_from_str(txt):
# ---
class OPReturn:
''' OPReturn helper namespace. Used by GUI main_window.py and also
lib/commands.py '''
electroncash/commands.py '''
class Error(Exception):
""" thrown when the OP_RETURN for a tx not of the right format """

Expand Down
2 changes: 1 addition & 1 deletion electroncash/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ def run_with_except_hook(*args2, **kwargs2):

def versiontuple(v):
''' Please do not use this function as it breaks with EC version styles
of things like '3.3.4CS'. Instead, use lib/version.parse_package_version'''
of things like '3.3.4CS'. Instead, use electroncash/version.parse_package_version'''
return tuple(map(int, (v.split("."))))


Expand Down
2 changes: 1 addition & 1 deletion electroncash_plugins/fusion/covert.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def is_tor_port(host, port):
try:
socketclass = socket.socket
try:
# socket.socket could be monkeypatched (see lib/network.py),
# socket.socket could be monkeypatched (see electroncash/network.py),
# in which case we need to get the real one.
socketclass = socket._socketobject
except AttributeError:
Expand Down
5 changes: 0 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,6 @@ def run(self):
'electroncash_plugins.satochip',
'electroncash_plugins.fusion',
],
package_dir={
'electroncash': 'electroncash',
'electroncash_gui': 'electroncash_gui',
'electroncash_plugins': 'electroncash_plugins',
},
package_data={
'electroncash': [
'servers.json',
Expand Down

0 comments on commit e4f6887

Please sign in to comment.