Closed icb- closed 9 years ago
Is the argparse dependency for <3.2 standard? Because if not, we don't actually support 3.2 and we have a number of syntax incompatibilities stopping 3* from working.
Are
# python -m pypxe.server
and
# pypxe
Functionally identical?
Other than that I like this.
I copied the check for argparse
from another setup.py
. I can remove the reference to 3 if you want.
Yes, python -m pypxe.server
and pypxe
should work the same, with one caveat. If you're running from a checkout, python -m pypxe.server
will use the local python path. pypxe
will use the system path.
1z [root@icb:~/PyPXE-icb] # git diff
diff --git a/pypxe/server.py b/pypxe/server.py
index 2004583..5166664 100755
--- a/pypxe/server.py
+++ b/pypxe/server.py
@@ -165,7 +165,7 @@ def main():
handler.setFormatter(formatter)
sys_logger.addHandler(handler)
sys_logger.setLevel(logging.INFO)
-
+ sys_logger.warn("I'm the local checkout!")
# pass warning to user regarding starting HTTP server without iPXE
if args.USE_HTTP and not args.USE_IPXE and not args.USE_DHCP:
sys_logger.warning('HTTP selected but iPXE disabled. PXE ROM must support HTTP requests.')
1z [root@icb:~/PyPXE-icb] # python -m pypxe.server
2015-05-19 22:18:14,840 [WARNING] PyPXE I'm the local checkout!
2015-05-19 22:18:14,840 [INFO] PyPXE Starting TFTP server...
2015-05-19 22:18:14,841 [INFO] PyPXE PyPXE successfully initialized and running!
^C
Shutting down PyPXE...
1z [root@icb:~/PyPXE-icb] 1 # pypxe
2015-05-19 22:18:20,001 [INFO] PyPXE Starting TFTP server...
2015-05-19 22:18:20,001 [INFO] PyPXE PyPXE successfully initialized and running!
^C
Shutting down PyPXE...
1z [root@icb:~/PyPXE-icb] 1 #
I think we ought to add some kind of error when trying to install with python3 as otherwise you get slightly ambiguous errors when attempting to run anything.
That sounds good then.
@mmattioli comments?
Added an explicit check for running under Python 3 in setup.py
and exit if true.
Is there anything I should change here? I have other additions I want to get started on, but I want to have this completed first.
Apologies, I'd forgotten about this. I'll merge it now.
Moved
pypxe-server.py
to bepypxe.server
, and made modifications required for that to work. Added asetuptools
install script. Added relevant.gitignore
bits for that.