<commit_before># Copyright 2011 James McCauley
#
# This file is part of POX.
#
# POX is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# POX is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with POX.  If not, see <http://www.gnu.org/licenses/>.

"""
This is an L2 learning switch written directly against the OpenFlow library.
It is derived from one written live for an SDN crash course.
"""

from pox.core import core
import pox.openflow.libopenflow_01 as of
from pox.lib.revent import *
from pox.lib.util import dpidToStr
from pox.lib.util import str_to_bool
from pox.lib.packet.ethernet import ethernet
from pox.lib.packet.ipv4 import ipv4
from pox.lib.packet.arp import arp
from pox.lib.packet.udp import udp
from pox.lib.packet.dns import dns
from pox.lib.addresses import IPAddr, EthAddr

import time
import code
import os
import struct
import sys

log = core.getLogger()
FLOOD_DELAY = 5
IPCONFIG_FILE = '/home/ubuntu/cs144_lab3/IP_CONFIG'
IP_SETTING={}
RTABLE = []
ROUTER_IP={}

INTERNAL_IP = {}
INTERNAL_IP['10.0.1.10'] = 'server1'
INTERNAL_IP['10.0.1.12'] = 'server2'
INTERNAL_IP['10.0.1.13'] = 'sw0-eth1'
INTERNAL_IP['10.0.1.14'] = 'sw0-eth2'
INTERNAL_IP['10.0.1.11'] = 'sw0-eth3'

INTERNAL_NAME = {}
NAME_SETTING = {}
#Topology is fixed
#sw0-eth1:server1-eth0 sw0-eth2:server2-eth0 sw0-eth3:Internet

class RouterInfo(Event):
  '''Event to raise upon the information about an openflow router is ready'''

  def __init__(self, info, rtable):
    Event.__init__(self)
    self.info = info
    self.rtable = rtable

class OFHandler (EventMixin):
  def __init__ (self, connection, transparent):
    # Switch we'll be adding L2 learning switch capabilities to
    self.connection = connection
    self.transparent = transparent
    self.sw_info = {}
    self.connection.send(of.ofp_switch_config(miss_send_len = 20000))
    for port in connection.features.ports:
        intf_name = port.name.split('-')
        if(len(intf_name) < 2):
          continue
        else:
          intf_name = intf_name[1]
        if intf_name in ROUTER_IP.keys():
          self.sw_info[intf_name] = (ROUTER_IP[intf_name], port.hw_addr.toStr(), '10Gbps', port.port_no)
    self.rtable = RTABLE
    # We want to hear Openflow PacketIn messages, so we listen
    self.listenTo(connection)
    self.listenTo(core.cs144_srhandler)
    core.cs144_ofhandler.raiseEvent(RouterInfo(self.sw_info, self.rtable))

  def _handle_PacketIn (self, event):
    """
    Handles packet in messages from the switch to implement above algorithm.
    """
    pkt = event.parse()
    #code.interact(local=locals())

    #log.debug("OFHandler: Got OF PacketIN!\n")

    if( event.port == 3 and pkt.type == ethernet.ARP_TYPE and pkt.next.opcode == arp.REQUEST):
        arp_req = pkt.next
        #log.debug("\nGot a packet request from port 3, flood it\n")
        arp_reply = arp()
        arp_reply.hwtype = arp_req.hwtype
        arp_reply.prototype = arp_req.prototype
        arp_reply.hwlen = arp_req.hwlen
        arp_reply.protolen = arp_req.protolen
        arp_reply.opcode = arp.REPLY
        arp_reply.protodst = arp_req.protosrc
        arp_reply.protosrc = arp_req.protodst
        arp_reply.hwsrc = EthAddr(self.sw_info["eth3"][1])
        arp_reply.hwdst = arp_req.hwsrc
        e = ethernet(type=pkt.type, src=arp_reply.hwsrc, dst=arp_req.hwsrc)
        e.payload = arp_reply
        msg = of.ofp_packet_out()
        msg.data = e.pack()
        msg.actions.append(of.ofp_action_output(port = of.OFPP_IN_PORT))
        msg.in_port = event.port
        event.connection.send(msg)
    elif (event.port == 3) :
        #log.debug("OFHandler: raise SRPacketIn event\n")
        #log.debug("OFHandler: packet from outside, translate address\n")
        #implement an internal NAT here
        packet = event.parse()
        #print 'original packet: ', packet
        if( packet.type == ethernet.IP_TYPE ):
          ip_pkt = packet.next
          #print INTERNAL_IP.keys()
          #print IP_SETTING.values()
          #print ip_pkt.dstip
          dst_ip = ip_pkt.dstip.toStr()
          src_ip = ip_pkt.srcip.toStr()
          if(dst_ip in INTERNAL_IP.keys()):
            #print "change IP destination\n"
            ip_pkt.dstip = IPAddr(IP_SETTING[INTERNAL_IP[dst_ip]])
            ip_pkt.csum = ip_pkt.checksum()
#            ip_pkt.raw = ip_pkt.pack()
            ip_pkt.raw = None
            packet.next = ip_pkt
        elif( packet.type == ethernet.ARP_TYPE ):
          if( packet.next.opcode == arp.REPLY ):
            arp_reply = packet.next
            dst_ip = arp_reply.protodst.toStr()
            if( dst_ip in INTERNAL_IP.keys()):
              #print "change arp reply dst \n"
              arp_reply.protodst = IPAddr(IP_SETTING[INTERNAL_IP[dst_ip]])
              #print arp_reply.protodst
              arp_reply.raw = None
              packet.next = arp_reply
        #print "modified packet: ", packet
        raw_packet = packet.pack()
        core.cs144_ofhandler.raiseEvent(SRPacketIn(raw_packet, event.port))
    else:
        raw_packet = pkt.raw
        core.cs144_ofhandler.raiseEvent(SRPacketIn(raw_packet, event.port))
        # Drop this packet as we won't reference it.  Just trying to be
        # safe so that OVS's/vswitchd's buffer doesn't have stale packets.
        msg = of.ofp_packet_out()
        msg.buffer_id = event.ofp.buffer_id
        msg.in_port = event.port
        self.connection.send(msg)

  def _handle_SRPacketOut(self, event):
    msg = of.ofp_packet_out()
    new_packet = event.pkt
    if(event.port == 3):
      #out going packet, need to go through NAT
      packet = ethernet(raw = event.pkt)
      if( packet.type == ethernet.IP_TYPE ):
        #print "in SRPacketOut"
        #print packet
        ip_pkt = ipv4(raw=event.pkt[ethernet.MIN_LEN:])
        if( ip_pkt.protocol == ipv4.UDP_PROTOCOL and ip_pkt.next.dstport == 53):
          src_ip = ip_pkt.srcip.toStr()
          if( src_ip in IP_SETTING.values()):
            ip_pkt.srcip = IPAddr(INTERNAL_NAME[NAME_SETTING[src_ip]])
            ip_pkt.csum = ip_pkt.checksum()
            packet.next = ip_pkt
            #new_packet = packet.pack()
            #event.pkt[ethernet.MIN_LEN:ipv4.hl] = ip_pkt.tyhdr()
            #ipp = ip_pkt
            #event.pkt[ethernet.MIN_LEN:ip_pkt.hl] = struct.pack('!BBHHHBBHII', (ipp.v << 4) + ipp.hl, ipp.tos, ipp.iplen, ipp.id, (ipp.flags << 13) | ipp.frag, ipp.ttl, ipp.protocol, ipp.csum, ipp.srcip.toUnsigned(), ipp.dstip.toUnsigned())
            #npkt = ipv4(raw=event.pkt[ethernet.MIN_LEN:])
            #print npkt
#            udp_pkt= ip_pkt.next
#            dns_pkt = udp_pkt.next
#            print dns_pkt
#            d = dns()
#            u = udp()
#            ipp = ipv4()
#            ipp.protocol = ipp.UDP_PROTOCOL
#            ipp.srcip = IPAddr(INTERNAL_NAME[NAME_SETTING[src_ip]])
#            ipp.dstip = ip_pkt.dstip
#            e = ethernet()
#            e.src = packet.src
#            e.dst = packet.dst
#            e.type = e.IP_TYPE
#            ipp.payload = udp_pkt
#            e.payload = ipp
#            new_packet = e.pack()
        else:
          src_ip = ip_pkt.srcip.toStr()
          #print ip_pkt.srcip
          if(src_ip in IP_SETTING.values()):
#            print "change IP src\n"
            ip_pkt.srcip = IPAddr(INTERNAL_NAME[NAME_SETTING[src_ip]])
#            print ip_pkt.srcip
            ip_pkt.csum = ip_pkt.checksum()
            ip_pkt.raw = None
            packet.next = ip_pkt
            new_packet = packet.pack()
      elif( packet.type == ethernet.ARP_TYPE ):
        if( packet.next.opcode == arp.REQUEST ):
#          print "get a arp request"
          arp_req = packet.next
          src_ip = arp_req.protosrc.toStr()
          if( src_ip in IP_SETTING.values()):
#            print "change arp request src \n"
            arp_req.protosrc = IPAddr(INTERNAL_NAME[NAME_SETTING[src_ip]])
#            print arp_req.protosrc
            arp_req.raw = None
            packet.next = arp_req
            new_packet = packet.pack()
    msg.actions.append(of.ofp_action_output(port=event.port))
    msg.buffer_id = -1
    msg.in_port = of.OFPP_NONE
    msg.data = new_packet
    #log.debug("SRServer catch SRPacketOut event, fwd_pkt=%r, port=%s\n" % (event.pkt, event.port))
    self.connection.send(msg)

class SRPacketIn(Event):
  '''Event to raise upon a receive a packet_in from openflow'''

  def __init__(self, packet, port):
    Event.__init__(self)
    self.pkt = packet
    self.port = port

class cs144_ofhandler (EventMixin):
  """
  Waits for OpenFlow switches to connect and makes them learning switches.
  """
  _eventMixin_events = set([SRPacketIn, RouterInfo])

  def __init__ (self, transparent):
    EventMixin.__init__(self)
    self.listenTo(core.openflow)
    self.transparent = transparent

  def _handle_ConnectionUp (self, event):
    log.debug("Connection %s" % (event.connection,))
    OFHandler(event.connection, self.transparent)

def get_ip_setting():
  if (not os.path.isfile(IPCONFIG_FILE)):
    return -1
  f = open(IPCONFIG_FILE, 'r')
  for line in f:
    if(len(line.split()) == 0):
      break
    name, ip = line.split()
    if ip == "<ELASTIC_IP>":
      log.info("ip configuration is not set, please put your Elastic IP addresses into %s" % IPCONFIG_FILE)
      sys.exit(2)
    #print name, ip
    IP_SETTING[name] = ip
    NAME_SETTING[ip] = name

  RTABLE.append( ('0.0.0.0', '10.0.1.1', '0.0.0.0', 'eth3') )
  RTABLE.append( ('%s' % IP_SETTING['server1'], '%s' % IP_SETTING['server1'], '255.255.255.255', 'eth1') )
  RTABLE.append( ('%s' % IP_SETTING['server2'], '%s' % IP_SETTING['server2'], '255.255.255.255', 'eth2') )

# We don't want to flood immediately when a switch connects.
  ROUTER_IP['eth1'] = '%s' % IP_SETTING['sw0-eth1']
  ROUTER_IP['eth2'] = '%s' % IP_SETTING['sw0-eth2']
  ROUTER_IP['eth3'] = '%s' % IP_SETTING['sw0-eth3']

  for key in INTERNAL_IP.keys():
    value = INTERNAL_IP[key]
    INTERNAL_NAME[value] = key

  return 0

def launch (transparent=False):
  """
  Starts an cs144 - L2 learning switch.
  """
  core.registerNew(cs144_ofhandler, str_to_bool(transparent))

  r = get_ip_setting()
  if r == -1:
    log.debug("Couldn't load config file for ip addresses, check whether %s exists" % IPCONFIG_FILE)
    sys.exit(2)
    #sys.exit("Couldn't load config file for ip addresses, check whether %s exists" % IPCONFIG_FILE)
  else:
    log.debug('*** ofhandler: Successfully loaded ip settings for hosts\n %s\n' % IP_SETTING)
<commit_msg>update icmp packet<commit_after># Copyright 2011 James McCauley
#
# This file is part of POX.
#
# POX is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# POX is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with POX.  If not, see <http://www.gnu.org/licenses/>.

"""
This is an L2 learning switch written directly against the OpenFlow library.
It is derived from one written live for an SDN crash course.
"""

from pox.core import core
import pox.openflow.libopenflow_01 as of
from pox.lib.revent import *
from pox.lib.util import dpidToStr
from pox.lib.util import str_to_bool
from pox.lib.packet.ethernet import ethernet
from pox.lib.packet.ipv4 import ipv4
import pox.lib.packet.icmp as icmp
from pox.lib.packet.arp import arp
from pox.lib.packet.udp import udp
from pox.lib.packet.dns import dns
from pox.lib.addresses import IPAddr, EthAddr

import time
import code
import os
import struct
import sys

log = core.getLogger()
FLOOD_DELAY = 5
IPCONFIG_FILE = '/home/ubuntu/cs144_lab3/IP_CONFIG'
IP_SETTING={}
RTABLE = []
ROUTER_IP={}

INTERNAL_IP = {}
INTERNAL_IP['10.0.1.10'] = 'server1'
INTERNAL_IP['10.0.1.12'] = 'server2'
INTERNAL_IP['10.0.1.13'] = 'sw0-eth1'
INTERNAL_IP['10.0.1.14'] = 'sw0-eth2'
INTERNAL_IP['10.0.1.11'] = 'sw0-eth3'

INTERNAL_NAME = {}
NAME_SETTING = {}
#Topology is fixed
#sw0-eth1:server1-eth0 sw0-eth2:server2-eth0 sw0-eth3:Internet

class RouterInfo(Event):
  '''Event to raise upon the information about an openflow router is ready'''

  def __init__(self, info, rtable):
    Event.__init__(self)
    self.info = info
    self.rtable = rtable

class OFHandler (EventMixin):
  def __init__ (self, connection, transparent):
    # Switch we'll be adding L2 learning switch capabilities to
    self.connection = connection
    self.transparent = transparent
    self.sw_info = {}
    self.connection.send(of.ofp_switch_config(miss_send_len = 20000))
    for port in connection.features.ports:
        intf_name = port.name.split('-')
        if(len(intf_name) < 2):
          continue
        else:
          intf_name = intf_name[1]
        if intf_name in ROUTER_IP.keys():
          self.sw_info[intf_name] = (ROUTER_IP[intf_name], port.hw_addr.toStr(), '10Gbps', port.port_no)
    self.rtable = RTABLE
    # We want to hear Openflow PacketIn messages, so we listen
    self.listenTo(connection)
    self.listenTo(core.cs144_srhandler)
    core.cs144_ofhandler.raiseEvent(RouterInfo(self.sw_info, self.rtable))

  def _handle_PacketIn (self, event):
    """
    Handles packet in messages from the switch to implement above algorithm.
    """
    pkt = event.parse()
    #code.interact(local=locals())

    #log.debug("OFHandler: Got OF PacketIN!\n")

    if( event.port == 3 and pkt.type == ethernet.ARP_TYPE and pkt.next.opcode == arp.REQUEST):
        arp_req = pkt.next
        #log.debug("\nGot a packet request from port 3, flood it\n")
        arp_reply = arp()
        arp_reply.hwtype = arp_req.hwtype
        arp_reply.prototype = arp_req.prototype
        arp_reply.hwlen = arp_req.hwlen
        arp_reply.protolen = arp_req.protolen
        arp_reply.opcode = arp.REPLY
        arp_reply.protodst = arp_req.protosrc
        arp_reply.protosrc = arp_req.protodst
        arp_reply.hwsrc = EthAddr(self.sw_info["eth3"][1])
        arp_reply.hwdst = arp_req.hwsrc
        e = ethernet(type=pkt.type, src=arp_reply.hwsrc, dst=arp_req.hwsrc)
        e.payload = arp_reply
        msg = of.ofp_packet_out()
        msg.data = e.pack()
        msg.actions.append(of.ofp_action_output(port = of.OFPP_IN_PORT))
        msg.in_port = event.port
        event.connection.send(msg)
    elif (event.port == 3) :
        #log.debug("OFHandler: raise SRPacketIn event\n")
        #log.debug("OFHandler: packet from outside, translate address\n")
        #implement an internal NAT here
        packet = event.parse()
        #print 'original packet: ', packet
        if( packet.type == ethernet.IP_TYPE ):
          ip_pkt = packet.next
          #print INTERNAL_IP.keys()
          #print IP_SETTING.values()
          #print ip_pkt.dstip
          dst_ip = ip_pkt.dstip.toStr()
          src_ip = ip_pkt.srcip.toStr()
          if(dst_ip in INTERNAL_IP.keys()):
            #print "change IP destination\n"
            ip_pkt.dstip = IPAddr(IP_SETTING[INTERNAL_IP[dst_ip]])
            ip_pkt.csum = ip_pkt.checksum()
#            ip_pkt.raw = ip_pkt.pack()
            ip_pkt.raw = None
            packet.next = ip_pkt
        elif( packet.type == ethernet.ARP_TYPE ):
          if( packet.next.opcode == arp.REPLY ):
            arp_reply = packet.next
            dst_ip = arp_reply.protodst.toStr()
            if( dst_ip in INTERNAL_IP.keys()):
              #print "change arp reply dst \n"
              arp_reply.protodst = IPAddr(IP_SETTING[INTERNAL_IP[dst_ip]])
              #print arp_reply.protodst
              arp_reply.raw = None
              packet.next = arp_reply
        #print "modified packet: ", packet
        raw_packet = packet.pack()
        core.cs144_ofhandler.raiseEvent(SRPacketIn(raw_packet, event.port))
    else:
        raw_packet = pkt.raw
        core.cs144_ofhandler.raiseEvent(SRPacketIn(raw_packet, event.port))
        # Drop this packet as we won't reference it.  Just trying to be
        # safe so that OVS's/vswitchd's buffer doesn't have stale packets.
        msg = of.ofp_packet_out()
        msg.buffer_id = event.ofp.buffer_id
        msg.in_port = event.port
        self.connection.send(msg)

  def _handle_SRPacketOut(self, event):
    msg = of.ofp_packet_out()
    new_packet = event.pkt
    if(event.port == 3):
      #out going packet, need to go through NAT
      packet = ethernet(raw = event.pkt)
      if( packet.type == ethernet.IP_TYPE ):
        #print "in SRPacketOut"
        #print packet
        ip_pkt = ipv4(raw=event.pkt[ethernet.MIN_LEN:])
        if( ip_pkt.protocol == ipv4.UDP_PROTOCOL and ip_pkt.next.dstport == 53):
          src_ip = ip_pkt.srcip.toStr()
          if( src_ip in IP_SETTING.values()):
            ip_pkt.srcip = IPAddr(INTERNAL_NAME[NAME_SETTING[src_ip]])
            ip_pkt.csum = ip_pkt.checksum()
            packet.next = ip_pkt
            #new_packet = packet.pack()
            #event.pkt[ethernet.MIN_LEN:ipv4.hl] = ip_pkt.tyhdr()
            #ipp = ip_pkt
            #event.pkt[ethernet.MIN_LEN:ip_pkt.hl] = struct.pack('!BBHHHBBHII', (ipp.v << 4) + ipp.hl, ipp.tos, ipp.iplen, ipp.id, (ipp.flags << 13) | ipp.frag, ipp.ttl, ipp.protocol, ipp.csum, ipp.srcip.toUnsigned(), ipp.dstip.toUnsigned())
            #npkt = ipv4(raw=event.pkt[ethernet.MIN_LEN:])
            #print npkt
#            udp_pkt= ip_pkt.next
#            dns_pkt = udp_pkt.next
#            print dns_pkt
#            d = dns()
#            u = udp()
#            ipp = ipv4()
#            ipp.protocol = ipp.UDP_PROTOCOL
#            ipp.srcip = IPAddr(INTERNAL_NAME[NAME_SETTING[src_ip]])
#            ipp.dstip = ip_pkt.dstip
#            e = ethernet()
#            e.src = packet.src
#            e.dst = packet.dst
#            e.type = e.IP_TYPE
#            ipp.payload = udp_pkt
#            e.payload = ipp
#            new_packet = e.pack()
        else:
          src_ip = ip_pkt.srcip.toStr()
          #print ip_pkt.srcip
          if(src_ip in IP_SETTING.values()):
#            print "change IP src\n"
            ip_pkt.srcip = IPAddr(INTERNAL_NAME[NAME_SETTING[src_ip]])
#            print ip_pkt.srcip
            ip_pkt.csum = ip_pkt.checksum()
            ip_pkt.raw = None
            packet.next = ip_pkt
            new_packet = packet.pack()
            if ( ip_pkt.protocol == ipv4.ICMP_PROTOCOL ):
                icmp_pkt = ip_pkt.next
                icmp_pkt.raw = None
                if( icmp_pkt.type == 3 ):
                        ip_hdr = icmp_pkt.next.next
                        ip_hdr.dstip = IPAddr(INTERNAL_NAME[NAME_SETTING[src_ip]])
                        #print "Replace icmp MSG IP addr !!!!\n"
                        #print icmp_pkt
      elif( packet.type == ethernet.ARP_TYPE ):
        if( packet.next.opcode == arp.REQUEST ):
#          print "get a arp request"
          arp_req = packet.next
          src_ip = arp_req.protosrc.toStr()
          if( src_ip in IP_SETTING.values()):
#            print "change arp request src \n"
            arp_req.protosrc = IPAddr(INTERNAL_NAME[NAME_SETTING[src_ip]])
#            print arp_req.protosrc
            arp_req.raw = None
            packet.next = arp_req
            new_packet = packet.pack()
    msg.actions.append(of.ofp_action_output(port=event.port))
    msg.buffer_id = -1
    msg.in_port = of.OFPP_NONE
    msg.data = new_packet
    #log.debug("SRServer catch SRPacketOut event, fwd_pkt=%r, port=%s\n" % (event.pkt, event.port))
    self.connection.send(msg)

class SRPacketIn(Event):
  '''Event to raise upon a receive a packet_in from openflow'''

  def __init__(self, packet, port):
    Event.__init__(self)
    self.pkt = packet
    self.port = port

class cs144_ofhandler (EventMixin):
  """
  Waits for OpenFlow switches to connect and makes them learning switches.
  """
  _eventMixin_events = set([SRPacketIn, RouterInfo])

  def __init__ (self, transparent):
    EventMixin.__init__(self)
    self.listenTo(core.openflow)
    self.transparent = transparent

  def _handle_ConnectionUp (self, event):
    log.debug("Connection %s" % (event.connection,))
    OFHandler(event.connection, self.transparent)

def get_ip_setting():
  if (not os.path.isfile(IPCONFIG_FILE)):
    return -1
  f = open(IPCONFIG_FILE, 'r')
  for line in f:
    if(len(line.split()) == 0):
      break
    name, ip = line.split()
    if ip == "<ELASTIC_IP>":
      log.info("ip configuration is not set, please put your Elastic IP addresses into %s" % IPCONFIG_FILE)
      sys.exit(2)
    #print name, ip
    IP_SETTING[name] = ip
    NAME_SETTING[ip] = name

  RTABLE.append( ('0.0.0.0', '10.0.1.1', '0.0.0.0', 'eth3') )
  RTABLE.append( ('%s' % IP_SETTING['server1'], '%s' % IP_SETTING['server1'], '255.255.255.255', 'eth1') )
  RTABLE.append( ('%s' % IP_SETTING['server2'], '%s' % IP_SETTING['server2'], '255.255.255.255', 'eth2') )

# We don't want to flood immediately when a switch connects.
  ROUTER_IP['eth1'] = '%s' % IP_SETTING['sw0-eth1']
  ROUTER_IP['eth2'] = '%s' % IP_SETTING['sw0-eth2']
  ROUTER_IP['eth3'] = '%s' % IP_SETTING['sw0-eth3']

  for key in INTERNAL_IP.keys():
    value = INTERNAL_IP[key]
    INTERNAL_NAME[value] = key

  return 0

def launch (transparent=False):
  """
  Starts an cs144 - L2 learning switch.
  """
  core.registerNew(cs144_ofhandler, str_to_bool(transparent))

  r = get_ip_setting()
  if r == -1:
    log.debug("Couldn't load config file for ip addresses, check whether %s exists" % IPCONFIG_FILE)
    sys.exit(2)
    #sys.exit("Couldn't load config file for ip addresses, check whether %s exists" % IPCONFIG_FILE)
  else:
    log.debug('*** ofhandler: Successfully loaded ip settings for hosts\n %s\n' % IP_SETTING)
<|endoftext|>


<commit_before>from setuptools import setup, find_packages

CLASSIFIERS = [
    'License :: OSI Approved :: Apache Software License',
    'License :: OSI Approved :: MIT License',
    'Topic :: Software Development :: Testing',
    'Programming Language :: Other',
]

setup(
    name = 'travis-cargo',
    version = '0.1.9',
    description = ('Manages interactions between travis and cargo/rust compilers.'),
    author = 'Huon Wilson',
    author_email = 'dbau.pp@gmail.com',
    url = 'https://github.com/huonw/travis-cargo',
    download_url = 'https://github.com/huonw/travis-cargo/tarball/0.1.9',
    keywords = ['testing', 'travis', 'rust', 'cargo'],
    packages = find_packages(),
    py_modules = ['travis_cargo'],
    entry_points = {
        'console_scripts': ['travis-cargo=travis_cargo:main']
    },
    classifiers = CLASSIFIERS,
)
<commit_msg>0.1.10: invoke cargo correctly, no matter what version of Rust.<commit_after>from setuptools import setup, find_packages

CLASSIFIERS = [
    'License :: OSI Approved :: Apache Software License',
    'License :: OSI Approved :: MIT License',
    'Topic :: Software Development :: Testing',
    'Programming Language :: Other',
]

setup(
    name = 'travis-cargo',
    version = '0.1.10',
    description = ('Manages interactions between travis and cargo/rust compilers.'),
    author = 'Huon Wilson',
    author_email = 'dbau.pp@gmail.com',
    url = 'https://github.com/huonw/travis-cargo',
    download_url = 'https://github.com/huonw/travis-cargo/tarball/0.1.10',
    keywords = ['testing', 'travis', 'rust', 'cargo'],
    packages = find_packages(),
    py_modules = ['travis_cargo'],
    entry_points = {
        'console_scripts': ['travis-cargo=travis_cargo:main']
    },
    classifiers = CLASSIFIERS,
)
<|endoftext|>


<commit_before><<<<<<< HEAD
import os, datetime, re, sqlite3
=======
#!/usr/bin/env python

import os
import datetime
import re
import sqlite3
>>>>>>> origin/master

# this function returns a count of the immediate subdirectories as an integer
def get_immediate_subdirectories(a_dir):
    return [name for name in os.listdir(a_dir)
            if os.path.isdir(os.path.join(a_dir, name))]

# the base bath of the DRMC as it is mounted on VMDRMC02
base_path_1 = '/home/archivesuser/moma/drmc/'
base_path_2 = '/mnt/pre-ingest/'

# a dictionary of the workflow containing a nested data structure: the values are 1)directory name 2)placeholder for count of directories 3)placeholder list array of artwork folder names
locations_dict = {'preIngest':[base_path_1+'pre-ingest_staging','',['']], 'readyForIngest':[base_path_1+'ready_for_ingest','',['']], 'readyForIngest2':[base_path_1+'ready_for_ingest_2','',['']], 'artworkBacklog':[base_path_1+'Artwork_level_backlog','',['']],'mpaBacklog':[base_path_1+'Artwork_level_backlog/_MPA','',['']], 'preIngestIsilon':[base_path_2+'staging','',['']]}

# for each location in the above dictionary
for location in locations_dict:
	#assemble the full path
	fullpath = locations_dict[location][0]
	#set this in the dictionary
	locations_dict[location][0] = fullpath
	#get the immediate subdirectories
	fullpath_listing = get_immediate_subdirectories(fullpath)
	#put them in the dictionary
	locations_dict[location][2] = fullpath_listing
	# count the length
	fullpath_size = len(fullpath_listing)
	locations_dict[location][1] = fullpath_size
	print locations_dict[location][1]

# The sqlite DB called "metrics" has 4 tables
# table 1: preIngest
# table 2: runComponent
# table 3: readyForIngest
# table 4: artworkBacklog
# table 5: counting
#
# The structure of tables 1-4 is:
# +--------+----------------------------------------------+-------------+----------------+
# | ObjID  |                 folderName                   | appearedOn  | disappearedOn  |
# +--------+----------------------------------------------+-------------+----------------+
# | 169688 | Cohen_Jem---Little_Flags---F2013.43---169688 | 2015-01-05  | 2015-03-24     |
# +--------+----------------------------------------------+-------------+----------------+
#
# The structure of table 5 is:
# +------------+-----------------------+------------+---------------+------------------+--+
# |    Date    |  artworkLevelBacklog  | preIngest  |  runComponent |  readyForIngest  |  |
# +------------+-----------------------+------------+---------------+------------------+--+
# | 2015-01-01 |                   350 |         70 |             0 |              500 |  |
# | 2015-01-02 |                   350 |         70 |             0 |              500 |  |
# | 2015-01-03 |                   348 |         73 |             0 |              502 |  |
# | 2015-01-04 |                   330 |         80 |             2 |              538 |  |
# +------------+-----------------------+------------+---------------+------------------+--+
#
# The output of the artwork level stats could look something like this
# +-----------+-----------------------------+------------+---------------+------------------+
# |  Obj num  |            Title            | pre-ingest | run-component | ready-for-ingest |
# +-----------+-----------------------------+------------+---------------+------------------+
# | 68.2015.1 | Wing House Helsinki Finland | 90 days    | 10 days       | 2 days           |
# | F2013.43  | Little Flags                | 30 days    | 5 days        | 10 days          |
# +-----------+-----------------------------+------------+---------------+------------------+
#

i = datetime.datetime.now()
now = i.isoformat()

#######
####### this first function is to add any newly appeared directories to the database, and log the present date as the "appeared on" date
#######
def dbSync(location):
	a = 0
	b = 0
	artworklist = locations_dict[location][2]
	for artwork in artworklist:
		objectID = re.sub('.*---.*---.*---', '', artwork)
		if objectID != "" and len(objectID) < 10 and isinstance(objectID, int) == True:
		# these conditions mitigate parsing errors for cases when the object ID is missing from the folder name
			conn = sqlite3.connect('/var/www/automation-audit/metrics.db')
			c = conn.cursor()
			query = c.execute("SELECT * FROM {0} WHERE ObjID = '{1}' ;".format(location,objectID))
			one = c.fetchone()
			if one != None:
				# print "{0} is already in the {1} DB".format(one,location)
				a = a+1
			else:
				# print "{0} will be added to the {1} table".format(objectID,location)
				b = b+1
				c.execute("INSERT INTO "+location+" VALUES (?,?,?,'')",(objectID,buffer(artwork),now))
				conn.commit()
				conn.close()
	print "{0} folders that are already tracked in the {1} DB".format(a, location)
	print "{0} folders that have been added to the {1} DB".format(b, location)

#######
####### this second function is to look through the database, and see if anything in the database is no longer in the directory -- if so, log the date
#######
def checkForMoves(location):
	a = 0
	b = 0
	artworklist = locations_dict[location][2]
	conn = sqlite3.connect('/var/www/automation-audit/metrics.db')
	c = conn.cursor()
	query = c.execute("SELECT * FROM {0}".format(location))
	for row in query:
		objectID = row[0]
		templist = []
		for artwork in artworklist:
			artworkObjectID = re.sub('.*---.*---.*---', '', artwork)
			if artworkObjectID != "" and len(artworkObjectID) < 10 and isinstance(artworkObjectID, int) == True:
				templist.append(int(artworkObjectID))
		if objectID in templist:
			# print "{0} is in the {1} table and still in the {2} dir".format(objectID,location,locations_dict[location][0])
			a = a+1
		else:
			# print "something has disappeared from the {0} dir".format(locations_dict[location][0])
			c.execute("UPDATE "+location+" SET disappearedOn=(?) WHERE ObjID=(?)",(now,objectID))
			b = b+1
	print "{} folders have not moved".format(a)
	print "{} folders have disappeared".format(b)
	conn.commit()
	conn.close()

def updateCounts():
	i = datetime.datetime.now().date()
	updatedate = i.isoformat()
	print "{} is the date".format(updatedate)
	conn = sqlite3.connect('/var/www/automation-audit/metrics.db')
	c = conn.cursor()

	query = c.execute("SELECT * FROM counting WHERE Date=(?)",(updatedate,))
	one = c.fetchone()
	print "result is: {}".format(one)
	if one == None:
		print "Logging counts for today..."
		c.execute("INSERT INTO counting VALUES (?,'','','','','','','')",(updatedate,))
		for location in locations_dict:
			c.execute("UPDATE counting SET "+location+"=(?) WHERE Date=(?)",(locations_dict[location][1],updatedate))
		conn.commit()
		conn.close()
	else:
<<<<<<< HEAD
		print "Updating today's entry"
		c.execute("UPDATE counting SET "+location+"=(?) WHERE Date=(?)",(locations_dict[location][1],updatedate))
=======
		print "Already an entry for today - let's update those numbers"
		for location in locations_dict:
			c.execute("UPDATE counting SET "+location+"=(?) WHERE Date=(?)",(locations_dict[location][1],updatedate))
		conn.commit()
		conn.close()
>>>>>>> origin/master

for location in locations_dict:
	print 'moving on to %s table' % location
	dbSync(location)
	checkForMoves(location)
updateCounts()
<commit_msg>conflict resolution<commit_after>#!/usr/bin/env python

import os
import datetime
import re
import sqlite3

# this function returns a count of the immediate subdirectories as an integer
def get_immediate_subdirectories(a_dir):
    return [name for name in os.listdir(a_dir)
            if os.path.isdir(os.path.join(a_dir, name))]

# the base bath of the DRMC as it is mounted on VMDRMC02
base_path_1 = '/home/archivesuser/moma/drmc/'
base_path_2 = '/mnt/pre-ingest/'

# a dictionary of the workflow containing a nested data structure: the values are 1)directory name 2)placeholder for count of directories 3)placeholder list array of artwork folder names
locations_dict = {'preIngest':[base_path_1+'pre-ingest_staging','',['']], 'readyForIngest':[base_path_1+'ready_for_ingest','',['']], 'readyForIngest2':[base_path_1+'ready_for_ingest_2','',['']], 'artworkBacklog':[base_path_1+'Artwork_level_backlog','',['']],'mpaBacklog':[base_path_1+'Artwork_level_backlog/_MPA','',['']], 'preIngestIsilon':[base_path_2+'staging','',['']]}

# for each location in the above dictionary
for location in locations_dict:
	#assemble the full path
	fullpath = locations_dict[location][0]
	#set this in the dictionary
	locations_dict[location][0] = fullpath
	#get the immediate subdirectories
	fullpath_listing = get_immediate_subdirectories(fullpath)
	#put them in the dictionary
	locations_dict[location][2] = fullpath_listing
	# count the length
	fullpath_size = len(fullpath_listing)
	locations_dict[location][1] = fullpath_size
	print locations_dict[location][1]

# The sqlite DB called "metrics" has 4 tables
# table 1: preIngest
# table 2: runComponent
# table 3: readyForIngest
# table 4: artworkBacklog
# table 5: counting
#
# The structure of tables 1-4 is:
# +--------+----------------------------------------------+-------------+----------------+
# | ObjID  |                 folderName                   | appearedOn  | disappearedOn  |
# +--------+----------------------------------------------+-------------+----------------+
# | 169688 | Cohen_Jem---Little_Flags---F2013.43---169688 | 2015-01-05  | 2015-03-24     |
# +--------+----------------------------------------------+-------------+----------------+
#
# The structure of table 5 is:
# +------------+-----------------------+------------+---------------+------------------+--+
# |    Date    |  artworkLevelBacklog  | preIngest  |  runComponent |  readyForIngest  |  |
# +------------+-----------------------+------------+---------------+------------------+--+
# | 2015-01-01 |                   350 |         70 |             0 |              500 |  |
# | 2015-01-02 |                   350 |         70 |             0 |              500 |  |
# | 2015-01-03 |                   348 |         73 |             0 |              502 |  |
# | 2015-01-04 |                   330 |         80 |             2 |              538 |  |
# +------------+-----------------------+------------+---------------+------------------+--+
#
# The output of the artwork level stats could look something like this
# +-----------+-----------------------------+------------+---------------+------------------+
# |  Obj num  |            Title            | pre-ingest | run-component | ready-for-ingest |
# +-----------+-----------------------------+------------+---------------+------------------+
# | 68.2015.1 | Wing House Helsinki Finland | 90 days    | 10 days       | 2 days           |
# | F2013.43  | Little Flags                | 30 days    | 5 days        | 10 days          |
# +-----------+-----------------------------+------------+---------------+------------------+
#

i = datetime.datetime.now()
now = i.isoformat()

#######
####### this first function is to add any newly appeared directories to the database, and log the present date as the "appeared on" date
#######
def dbSync(location):
	a = 0
	b = 0
	artworklist = locations_dict[location][2]
	for artwork in artworklist:
		objectID = re.sub('.*---.*---.*---', '', artwork)
		if objectID != "" and len(objectID) < 10 and isinstance(objectID, int) == True:
		# these conditions mitigate parsing errors for cases when the object ID is missing from the folder name
			conn = sqlite3.connect('/var/www/automation-audit/metrics.db')
			c = conn.cursor()
			query = c.execute("SELECT * FROM {0} WHERE ObjID = '{1}' ;".format(location,objectID))
			one = c.fetchone()
			if one != None:
				# print "{0} is already in the {1} DB".format(one,location)
				a = a+1
			else:
				# print "{0} will be added to the {1} table".format(objectID,location)
				b = b+1
				c.execute("INSERT INTO "+location+" VALUES (?,?,?,'')",(objectID,buffer(artwork),now))
				conn.commit()
				conn.close()
	print "{0} folders that are already tracked in the {1} DB".format(a, location)
	print "{0} folders that have been added to the {1} DB".format(b, location)

#######
####### this second function is to look through the database, and see if anything in the database is no longer in the directory -- if so, log the date
#######
def checkForMoves(location):
	a = 0
	b = 0
	artworklist = locations_dict[location][2]
	conn = sqlite3.connect('/var/www/automation-audit/metrics.db')
	c = conn.cursor()
	query = c.execute("SELECT * FROM {0}".format(location))
	for row in query:
		objectID = row[0]
		templist = []
		for artwork in artworklist:
			artworkObjectID = re.sub('.*---.*---.*---', '', artwork)
			if artworkObjectID != "" and len(artworkObjectID) < 10 and isinstance(artworkObjectID, int) == True:
				templist.append(int(artworkObjectID))
		if objectID in templist:
			# print "{0} is in the {1} table and still in the {2} dir".format(objectID,location,locations_dict[location][0])
			a = a+1
		else:
			# print "something has disappeared from the {0} dir".format(locations_dict[location][0])
			c.execute("UPDATE "+location+" SET disappearedOn=(?) WHERE ObjID=(?)",(now,objectID))
			b = b+1
	print "{} folders have not moved".format(a)
	print "{} folders have disappeared".format(b)
	conn.commit()
	conn.close()

def updateCounts():
	i = datetime.datetime.now().date()
	updatedate = i.isoformat()
	print "{} is the date".format(updatedate)
	conn = sqlite3.connect('/var/www/automation-audit/metrics.db')
	c = conn.cursor()

	query = c.execute("SELECT * FROM counting WHERE Date=(?)",(updatedate,))
	one = c.fetchone()
	print "result is: {}".format(one)
	if one == None:
		print "Logging counts for today..."
		c.execute("INSERT INTO counting VALUES (?,'','','','','','','')",(updatedate,))
		for location in locations_dict:
			c.execute("UPDATE counting SET "+location+"=(?) WHERE Date=(?)",(locations_dict[location][1],updatedate))
		conn.commit()
		conn.close()
	else:
		print "Already an entry for today - let's update those numbers"
		for location in locations_dict:
			c.execute("UPDATE counting SET "+location+"=(?) WHERE Date=(?)",(locations_dict[location][1],updatedate))
		conn.commit()
		conn.close()

for location in locations_dict:
	print 'moving on to %s table' % location
	dbSync(location)
	checkForMoves(location)
updateCounts()
<|endoftext|>


<commit_before>from setuptools import setup
setup(
    name='python-binary-memcached',
    version='0.20',
    author='Jayson Reis',
    author_email='santosdosreis@gmail.com',
    description='A pure python module (thread safe) to access memcached via it\'s binary' +
                ' protocol with SASL auth support',
    url='https://github.com/jaysonsantos/python-binary-memcached',
    packages=['bmemcached'],
    classifiers=[
        'Development Status :: 4 - Beta',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
    ]
)
<commit_msg>bumpped version<commit_after>from setuptools import setup
setup(
    name='python-binary-memcached',
    version='0.21',
    author='Jayson Reis',
    author_email='santosdosreis@gmail.com',
    description='A pure python module (thread safe) to access memcached via it\'s binary' +
                ' protocol with SASL auth support',
    url='https://github.com/jaysonsantos/python-binary-memcached',
    packages=['bmemcached'],
    classifiers=[
        'Development Status :: 4 - Beta',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
    ]
)
<|endoftext|>


<commit_before># -*- coding: utf-8 -*-

"""This preprocessor replaces HTML colors with latex colors in markdowncell
(this might be extended to more nice things...)
"""

#-----------------------------------------------------------------------------
# Copyright (c) 2015, Julius Schulz
#
# Distributed under the terms of the Modified BSD License.
#
#-----------------------------------------------------------------------------

from IPython.nbconvert.preprocessors import *
import re

class MarkdownPreprocessor(Preprocessor):
    def __init__(self, parent):
        self.colormatch = re.compile(r"(.*?)")

    def preprocess(self, nb, resources):
        for index, cell in enumerate(nb.cells):
            nb.cells[index], resources = self.preprocess_cell(cell, resources, index)
        return nb, resources

    def preprocess_cell(self, cell, resources, index):
        """
        Preprocess cell

        Parameters
        ----------
        cell : NotebookNode cell
            Notebook cell being processed
        resources : dictionary
            Additional resources used in the conversion process.  Allows
            preprocessors to pass variables into the Jinja engine.
        cell_index : int
            Index of the cell being processed (see base.py)
        """
        if cell.cell_type == "markdown":
            cell.source = self.colormatch.sub(r"\\textcolor{\1}{\2}", cell.source)
        return cell, resources
<commit_msg>added character replacement and documentation<commit_after># -*- coding: utf-8 -*-

"""This preprocessor replaces HTML colors with latex colors in markdowncell
(this might be extended to more nice things...)
"""

#-----------------------------------------------------------------------------
# Copyright (c) 2015, Julius Schulz
#
# Distributed under the terms of the Modified BSD License.
#
#-----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------

from IPython.nbconvert.preprocessors import *
import re

#-----------------------------------------------------------------------------
# Classes
#-----------------------------------------------------------------------------

class MarkdownPreprocessor(Preprocessor):
    def __init__(self, **kw):
        """
        Public constructor

        Parameters
        ----------
        config : Config
            Configuration file structure
        `**kw`
            Additional keyword arguments passed to parent
        """

        self.colormatch = re.compile(r"(.*?)")

        super(MarkdownPreprocessor, self).__init__(**kw)

    def preprocess(self, nb, resources):
        """
        Preprocessing to apply on each notebook.

        Must return modified nb, resources.

        If you wish to apply your preprocessing to each cell, you might want
        to override preprocess_cell method instead.

        Parameters
        ----------
        nb : NotebookNode
            Notebook being converted
        resources : dictionary
            Additional resources used in the conversion process.  Allows
            preprocessors to pass variables into the Jinja engine.
        """

        for index, cell in enumerate(nb.cells):
            nb.cells[index], resources = self.preprocess_cell(cell, resources, index)
        return nb, resources

    def preprocess_cell(self, cell, resources, index):
        """
        Preprocess cell

        Parameters
        ----------
        cell : NotebookNode cell
            Notebook cell being processed
        resources : dictionary
            Additional resources used in the conversion process.  Allows
            preprocessors to pass variables into the Jinja engine.
        cell_index : int
            Index of the cell being processed (see base.py)
        """
        if cell.cell_type == "markdown":
            cell.source = self.colormatch.sub(r"\\textcolor{\1}{\2}", cell.source)
        return cell, resources
<|endoftext|>


<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os
import sys

try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

if sys.argv[-1] == 'publish':
    os.system('python setup.py sdist upload')
    sys.exit()

readme = open('README.rst').read()
history = open('HISTORY.rst').read().replace('.. :changelog:', '')

setup(
    name='dbaas_zabbix',
    version='0.2.2',
    description='A Zabbix Integration for DBaaS.',
    long_description=readme + '\n\n' + history,
    author='Felippe Raposo',
    author_email='raposo.felippe@gmail.com',
    url='https://github.com/globocom'
        '/dbaas-zabbix',
    packages=[
        'dbaas_zabbix',
    ],
    package_dir={'dbaas_zabbix':
                 'dbaas_zabbix'},
    include_package_data=True,
    install_requires=[
    ],
    license="BSD",
    zip_safe=False,
    keywords='dbaas_zabbix',
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Natural Language :: English',
        "Programming Language :: Python :: 2",
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
    ],
    test_suite='tests',
)
<commit_msg>Change version ans add pyzabbix as requiremnt<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os
import sys

try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

if sys.argv[-1] == 'publish':
    os.system('python setup.py sdist upload')
    sys.exit()

readme = open('README.rst').read()
history = open('HISTORY.rst').read().replace('.. :changelog:', '')

setup(
    name='dbaas_zabbix',
    version='0.2.3',
    description='A Zabbix Integration for DBaaS.',
    long_description=readme + '\n\n' + history,
    author='Felippe Raposo',
    author_email='raposo.felippe@gmail.com',
    url='https://github.com/globocom'
        '/dbaas-zabbix',
    packages=[
        'dbaas_zabbix',
    ],
    package_dir={'dbaas_zabbix':
                 'dbaas_zabbix'},
    include_package_data=True,
    install_requires=[
        'pyzabbix'
    ],
    license="BSD",
    zip_safe=False,
    keywords='dbaas_zabbix',
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Natural Language :: English',
        "Programming Language :: Python :: 2",
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
    ],
    test_suite='tests',
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
"""Setup script to make PUDL directly installable with pip."""

from pathlib import Path

from setuptools import find_packages, setup

readme_path = Path(__file__).parent / "README.rst"
long_description = readme_path.read_text()

setup(
    name="catalystcoop.pudl",
    description="An open data processing pipeline for public US utility data.",
    long_description=long_description,
    long_description_content_type="text/x-rst",
    use_scm_version=True,
    author="Catalyst Cooperative",
    author_email="pudl@catalyst.coop",
    maintainer="Zane A. Selvans",
    maintainer_email="zane.selvans@catalyst.coop",
    url="https://catalyst.coop/pudl",
    project_urls={
        "Source": "https://github.com/catalyst-cooperative/pudl",
        "Documentation": "https://catalystcoop-pudl.readthedocs.io",
        "Issue Tracker": "https://github.com/catalyst-cooperative/pudl/issues",
    },
    license="MIT",
    keywords=[
        "electricity", "energy", "data", "analysis", "mcoe", "climate change",
        "finance", "eia 923", "eia 860", "ferc", "form 1", "epa ampd",
        "epa cems", "coal", "natural gas", "eia 861", "ferc 714"],
    python_requires=">=3.8,<3.10",
    setup_requires=["setuptools_scm"],
    install_requires=[
        "addfips~=0.3.1",
        "catalystcoop.dbfread~=3.0",
        "coloredlogs~=15.0",
        "datapackage~=1.11",  # Transition datastore to use frictionless.
        # "email-validator>=1.0.3",  # pydantic[email] dependency
        "fsspec~=2021.7",
        "gcsfs~=2021.7",
        "geopandas~=0.9.0",
        "jinja2~=3.0",
        "matplotlib~=3.0",  # Should make this optional with a "viz" extras
        "networkx~=2.2",
        "numpy~=1.20",
        "pandas~=1.3,!=1.3.3",  # IntCastingNaNError on v1.3.3 in unit tests
        "prefect[viz, gcp]~=0.15.0",
        "pyarrow~=5.0",
        "pydantic[email]~=1.7",
        "pygeos>=0.10,<0.12",
        "python-snappy~=0.6.0",
        "pyyaml~=5.0",
        "scikit-learn~=1.0",
        "scipy~=1.6",
        "sqlalchemy~=1.4",
        "timezonefinder~=5.0",
        "xlsxwriter~=3.0",
    ],
    extras_require={
        "dev": [
            "autopep8~=1.5",
            "ipdb~=0.13.4",
            "isort~=5.0",
            "jedi~=0.18",
            "lxml~=4.6",
            "tox~=3.20",
            "twine~=3.3",
        ],
        "doc": [
            "doc8~=0.9",
            "sphinx~=4.0",
            "sphinx-autoapi~=1.8",
            "sphinx-issues~=1.2",
            "sphinx-reredirects",
            "sphinx-rtd-dark-mode~=1.2",
            "sphinx-rtd-theme~=1.0",
            "sphinxcontrib_bibtex~=2.4",
        ],
        "test": [
            "bandit~=1.6",
            "coverage>=5.3,<7.0",
            "doc8~=0.9",
            "flake8~=4.0",
            "flake8-builtins~=1.5",
            "flake8-colors~=0.1",
            "flake8-docstrings~=1.5",
            "flake8-rst-docstrings~=0.2",
            "flake8-use-fstring~=1.0",
            "mccabe~=0.6",
            "nbval~=0.9",
            "pep8-naming~=0.12",
            "pre-commit~=2.9",
            "pydocstyle~=5.1",
            "pytest~=6.2",
            "pytest-console-scripts~=1.1",
            "pytest-cov>=2.10,<4.0",
            "responses~=0.14",
        ],
    },
    classifiers=[
        "Development Status :: 3 - Alpha",
        "Environment :: Console",
        "Intended Audience :: Science/Research",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: MIT License",
        "Natural Language :: English",
        "Operating System :: OS Independent",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Topic :: Scientific/Engineering",
    ],
    packages=find_packages("src"),
    package_dir={"": "src"},
    # package_data is data that is deployed within the python package on the
    # user"s system. setuptools will get whatever is listed in MANIFEST.in
    include_package_data=True,
    # This defines the interfaces to the command line scripts we"re including:
    entry_points={
        "console_scripts": [
            "censusdp1tract_to_sqlite = pudl.convert.censusdp1tract_to_sqlite:main",
            "metadata_to_rst = pudl.convert.metadata_to_rst:main",
            "epacems_to_parquet = pudl.convert.epacems_to_parquet:main",
            "ferc1_to_sqlite = pudl.convert.ferc1_to_sqlite:main",
            "pudl_datastore = pudl.workspace.datastore:main",
            "pudl_etl = pudl.cli:main",
            "pudl_setup = pudl.workspace.setup_cli:main",
            # Currently blows up memory usage to 100+ GB.
            # See https://github.com/catalyst-cooperative/pudl/issues/1174
            # "pudl_territories = pudl.analysis.service_territory:main",
            "state_demand = pudl.analysis.state_demand:main",
        ]
    },
)
<commit_msg>Update pyarrow requirement from ~=5.0 to >=5,<7<commit_after>#!/usr/bin/env python
"""Setup script to make PUDL directly installable with pip."""

from pathlib import Path

from setuptools import find_packages, setup

readme_path = Path(__file__).parent / "README.rst"
long_description = readme_path.read_text()

setup(
    name="catalystcoop.pudl",
    description="An open data processing pipeline for public US utility data.",
    long_description=long_description,
    long_description_content_type="text/x-rst",
    use_scm_version=True,
    author="Catalyst Cooperative",
    author_email="pudl@catalyst.coop",
    maintainer="Zane A. Selvans",
    maintainer_email="zane.selvans@catalyst.coop",
    url="https://catalyst.coop/pudl",
    project_urls={
        "Source": "https://github.com/catalyst-cooperative/pudl",
        "Documentation": "https://catalystcoop-pudl.readthedocs.io",
        "Issue Tracker": "https://github.com/catalyst-cooperative/pudl/issues",
    },
    license="MIT",
    keywords=[
        "electricity", "energy", "data", "analysis", "mcoe", "climate change",
        "finance", "eia 923", "eia 860", "ferc", "form 1", "epa ampd",
        "epa cems", "coal", "natural gas", "eia 861", "ferc 714"],
    python_requires=">=3.8,<3.10",
    setup_requires=["setuptools_scm"],
    install_requires=[
        "addfips~=0.3.1",
        "catalystcoop.dbfread~=3.0",
        "coloredlogs~=15.0",
        "datapackage~=1.11",  # Transition datastore to use frictionless.
        # "email-validator>=1.0.3",  # pydantic[email] dependency
        "fsspec~=2021.7",
        "gcsfs~=2021.7",
        "geopandas~=0.9.0",
        "jinja2~=3.0",
        "matplotlib~=3.0",  # Should make this optional with a "viz" extras
        "networkx~=2.2",
        "numpy~=1.20",
        "pandas~=1.3,!=1.3.3",  # IntCastingNaNError on v1.3.3 in unit tests
        "prefect[viz, gcp]~=0.15.0",
        "pyarrow>=5,<7",
        "pydantic[email]~=1.7",
        "pygeos>=0.10,<0.12",
        "python-snappy~=0.6.0",
        "pyyaml~=5.0",
        "scikit-learn~=1.0",
        "scipy~=1.6",
        "sqlalchemy~=1.4",
        "timezonefinder~=5.0",
        "xlsxwriter~=3.0",
    ],
    extras_require={
        "dev": [
            "autopep8~=1.5",
            "ipdb~=0.13.4",
            "isort~=5.0",
            "jedi~=0.18",
            "lxml~=4.6",
            "tox~=3.20",
            "twine~=3.3",
        ],
        "doc": [
            "doc8~=0.9",
            "sphinx~=4.0",
            "sphinx-autoapi~=1.8",
            "sphinx-issues~=1.2",
            "sphinx-reredirects",
            "sphinx-rtd-dark-mode~=1.2",
            "sphinx-rtd-theme~=1.0",
            "sphinxcontrib_bibtex~=2.4",
        ],
        "test": [
            "bandit~=1.6",
            "coverage>=5.3,<7.0",
            "doc8~=0.9",
            "flake8~=4.0",
            "flake8-builtins~=1.5",
            "flake8-colors~=0.1",
            "flake8-docstrings~=1.5",
            "flake8-rst-docstrings~=0.2",
            "flake8-use-fstring~=1.0",
            "mccabe~=0.6",
            "nbval~=0.9",
            "pep8-naming~=0.12",
            "pre-commit~=2.9",
            "pydocstyle~=5.1",
            "pytest~=6.2",
            "pytest-console-scripts~=1.1",
            "pytest-cov>=2.10,<4.0",
            "responses~=0.14",
        ],
    },
    classifiers=[
        "Development Status :: 3 - Alpha",
        "Environment :: Console",
        "Intended Audience :: Science/Research",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: MIT License",
        "Natural Language :: English",
        "Operating System :: OS Independent",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Topic :: Scientific/Engineering",
    ],
    packages=find_packages("src"),
    package_dir={"": "src"},
    # package_data is data that is deployed within the python package on the
    # user"s system. setuptools will get whatever is listed in MANIFEST.in
    include_package_data=True,
    # This defines the interfaces to the command line scripts we"re including:
    entry_points={
        "console_scripts": [
            "censusdp1tract_to_sqlite = pudl.convert.censusdp1tract_to_sqlite:main",
            "metadata_to_rst = pudl.convert.metadata_to_rst:main",
            "epacems_to_parquet = pudl.convert.epacems_to_parquet:main",
            "ferc1_to_sqlite = pudl.convert.ferc1_to_sqlite:main",
            "pudl_datastore = pudl.workspace.datastore:main",
            "pudl_etl = pudl.cli:main",
            "pudl_setup = pudl.workspace.setup_cli:main",
            # Currently blows up memory usage to 100+ GB.
            # See https://github.com/catalyst-cooperative/pudl/issues/1174
            # "pudl_territories = pudl.analysis.service_territory:main",
            "state_demand = pudl.analysis.state_demand:main",
        ]
    },
)
<|endoftext|>


<commit_before>#########
# Copyright (c) 2015 GigaSpaces Technologies Ltd. All rights reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
#  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  * See the License for the specific language governing permissions and
#  * limitations under the License.

from setuptools import setup

install_requires = [
    'cloudify-plugins-common==4.4.dev1',
    'cloudify-rest-client==4.4.dev1',
    'cloudify-script-plugin==1.5.2',
    'appdirs==1.4.3',
    'click==6.7',
    'celery==3.1.17',
    'jinja2==2.7.2',
    'pywinrm==0.0.3',
    'paramiko==1.18.3',
    'fabric==1.13.1',
    'wagon[venv]==0.6.1',
    'fasteners==0.13.0',
    'pyzmq==15.1.0',
    'virtualenv==15.1.0',
    'pip==9.0.1'
]

setup(
    name='cloudify-agent',
    version='4.4.dev1',
    author='Gigaspaces',
    author_email='cloudify@gigaspaces.com',
    packages=[
        'worker_installer',
        'windows_agent_installer',
        'plugin_installer',
        'windows_plugin_installer',
        'cloudify_agent',
        'cloudify_agent.api',
        'cloudify_agent.api.pm',
        'cloudify_agent.api.plugins',
        'cloudify_agent.installer',
        'cloudify_agent.installer.config',
        'cloudify_agent.installer.runners',
        'cloudify_agent.shell',
        'cloudify_agent.shell.commands'
    ],
    package_data={
        'cloudify_agent': [
            'VERSION',
            'resources/disable-requiretty.sh',
            'resources/crontab/disable.sh.template',
            'resources/crontab/enable.sh.template',
            'resources/respawn.sh.template',
            'resources/pm/initd/initd.conf.template',
            'resources/pm/initd/initd.template',
            'resources/pm/detach/detach.conf.template',
            'resources/pm/detach/detach.template',
            'resources/pm/nssm/nssm.exe',
            'resources/pm/nssm/nssm.conf.template',
            'resources/script/linux.sh.template',
            'resources/script/windows.ps1.template',
            'resources/script/linux-download.sh.template',
            'resources/script/windows-download.ps1.template'
        ]
    },
    description='Cloudify Agent Implementation (Celery based)',
    install_requires=install_requires,
    license='LICENSE',
    entry_points={
        'console_scripts': [
            'cfy-agent = cloudify_agent.shell.main:main',
        ]
    }
)
<commit_msg>Bump version<commit_after>#########
# Copyright (c) 2015 GigaSpaces Technologies Ltd. All rights reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
#  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  * See the License for the specific language governing permissions and
#  * limitations under the License.

from setuptools import setup

install_requires = [
    'cloudify-plugins-common==4.4.dev1',
    'cloudify-rest-client==4.4.dev1',
    'cloudify-script-plugin==1.5.3',
    'appdirs==1.4.3',
    'click==6.7',
    'celery==3.1.17',
    'jinja2==2.7.2',
    'pywinrm==0.0.3',
    'paramiko==1.18.3',
    'fabric==1.13.1',
    'wagon[venv]==0.6.1',
    'fasteners==0.13.0',
    'pyzmq==15.1.0',
    'virtualenv==15.1.0',
    'pip==9.0.1'
]

setup(
    name='cloudify-agent',
    version='4.4.dev1',
    author='Gigaspaces',
    author_email='cloudify@gigaspaces.com',
    packages=[
        'worker_installer',
        'windows_agent_installer',
        'plugin_installer',
        'windows_plugin_installer',
        'cloudify_agent',
        'cloudify_agent.api',
        'cloudify_agent.api.pm',
        'cloudify_agent.api.plugins',
        'cloudify_agent.installer',
        'cloudify_agent.installer.config',
        'cloudify_agent.installer.runners',
        'cloudify_agent.shell',
        'cloudify_agent.shell.commands'
    ],
    package_data={
        'cloudify_agent': [
            'VERSION',
            'resources/disable-requiretty.sh',
            'resources/crontab/disable.sh.template',
            'resources/crontab/enable.sh.template',
            'resources/respawn.sh.template',
            'resources/pm/initd/initd.conf.template',
            'resources/pm/initd/initd.template',
            'resources/pm/detach/detach.conf.template',
            'resources/pm/detach/detach.template',
            'resources/pm/nssm/nssm.exe',
            'resources/pm/nssm/nssm.conf.template',
            'resources/script/linux.sh.template',
            'resources/script/windows.ps1.template',
            'resources/script/linux-download.sh.template',
            'resources/script/windows-download.ps1.template'
        ]
    },
    description='Cloudify Agent Implementation (Celery based)',
    install_requires=install_requires,
    license='LICENSE',
    entry_points={
        'console_scripts': [
            'cfy-agent = cloudify_agent.shell.main:main',
        ]
    }
)
<|endoftext|>


<commit_before>#!/usr/bin/env python

import os
import setuptools

# Enable the option of building/installing Fabric 2.x as "fabric2". This allows
# users migrating from 1.x to 2.x to have both in the same process space and
# migrate piecemeal.
#
# NOTE: this requires some irritating tomfoolery; to wit:
# - the repo has a fabric2/ symlink to fabric/ so that things looking for
# fabric2/<whatever> will find it OK, whether that's code in here or deeper in
# setuptools/wheel/etc
# - wheels do _not_ execute this on install, only on generation, so maintainers
# just build wheels with the env var below turned on, and those wheels install
# 'fabric2' no problem
# - sdists execute this _both_ on package creation _and_ on install, so the env
# var only helps with inbound package metadata; on install by a user, if they
# don't have the env var, they'd end up with errors because this file tries to
# look in fabric/, not fabric2/
# - thus, we use a different test that looks locally to see if only one dir
# is present, and that overrides the env var test.
#
# See also sites/www/installing.txt.

env_wants_v2 = os.environ.get("PACKAGE_AS_FABRIC2", False)

here = os.path.abspath(os.path.dirname(__file__))
fabric2_present = os.path.isdir(os.path.join(here, "fabric2"))
fabric_present = os.path.isdir(os.path.join(here, "fabric"))
only_v2_present = fabric2_present and not fabric_present

package_name = "fabric"
binary_name = "fab"
if env_wants_v2 or only_v2_present:
    package_name = "fabric2"
    binary_name = "fab2"
packages = setuptools.find_packages(
    include=[package_name, "{}.*".format(package_name)]
)

# Version info -- read without importing
_locals = {}
with open(os.path.join(package_name, "_version.py")) as fp:
    exec(fp.read(), None, _locals)
version = _locals["__version__"]

# Frankenstein long_description: changelog note + README
long_description = """
To find out what's new in this version of Fabric, please see `the changelog
<http://fabfile.org/changelog.html>`_.

{}
""".format(
    open("README.rst").read()
)

testing_deps = ["mock>=2.0.0,<3.0"]
pytest_deps = ["pytest>=3.2.5,<4.0"]

setuptools.setup(
    name=package_name,
    version=version,
    description="High level SSH command execution",
    license="BSD",
    long_description=long_description,
    author="Jeff Forcier",
    author_email="jeff@bitprophet.org",
    url="http://fabfile.org",
    install_requires=[
        "invoke>=1.3,<2.0",
        "paramiko>=2.4",
    ],
    extras_require={
        "testing": testing_deps,
        "pytest": testing_deps + pytest_deps,
    },
    packages=packages,
    entry_points={
        "console_scripts": [
            "{} = {}.main:program.run".format(binary_name, package_name)
        ]
    },
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Environment :: Console",
        "Intended Audience :: Developers",
        "Intended Audience :: System Administrators",
        "License :: OSI Approved :: BSD License",
        "Operating System :: POSIX",
        "Operating System :: Unix",
        "Operating System :: MacOS :: MacOS X",
        "Operating System :: Microsoft :: Windows",
        "Programming Language :: Python",
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.4",
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: 3.6",
        "Topic :: Software Development",
        "Topic :: Software Development :: Build Tools",
        "Topic :: Software Development :: Libraries",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "Topic :: System :: Clustering",
        "Topic :: System :: Software Distribution",
        "Topic :: System :: Systems Administration",
    ],
)
<commit_msg>Python 3.7 exists<commit_after>#!/usr/bin/env python

import os
import setuptools

# Enable the option of building/installing Fabric 2.x as "fabric2". This allows
# users migrating from 1.x to 2.x to have both in the same process space and
# migrate piecemeal.
#
# NOTE: this requires some irritating tomfoolery; to wit:
# - the repo has a fabric2/ symlink to fabric/ so that things looking for
# fabric2/<whatever> will find it OK, whether that's code in here or deeper in
# setuptools/wheel/etc
# - wheels do _not_ execute this on install, only on generation, so maintainers
# just build wheels with the env var below turned on, and those wheels install
# 'fabric2' no problem
# - sdists execute this _both_ on package creation _and_ on install, so the env
# var only helps with inbound package metadata; on install by a user, if they
# don't have the env var, they'd end up with errors because this file tries to
# look in fabric/, not fabric2/
# - thus, we use a different test that looks locally to see if only one dir
# is present, and that overrides the env var test.
#
# See also sites/www/installing.txt.

env_wants_v2 = os.environ.get("PACKAGE_AS_FABRIC2", False)

here = os.path.abspath(os.path.dirname(__file__))
fabric2_present = os.path.isdir(os.path.join(here, "fabric2"))
fabric_present = os.path.isdir(os.path.join(here, "fabric"))
only_v2_present = fabric2_present and not fabric_present

package_name = "fabric"
binary_name = "fab"
if env_wants_v2 or only_v2_present:
    package_name = "fabric2"
    binary_name = "fab2"
packages = setuptools.find_packages(
    include=[package_name, "{}.*".format(package_name)]
)

# Version info -- read without importing
_locals = {}
with open(os.path.join(package_name, "_version.py")) as fp:
    exec(fp.read(), None, _locals)
version = _locals["__version__"]

# Frankenstein long_description: changelog note + README
long_description = """
To find out what's new in this version of Fabric, please see `the changelog
<http://fabfile.org/changelog.html>`_.

{}
""".format(
    open("README.rst").read()
)

testing_deps = ["mock>=2.0.0,<3.0"]
pytest_deps = ["pytest>=3.2.5,<4.0"]

setuptools.setup(
    name=package_name,
    version=version,
    description="High level SSH command execution",
    license="BSD",
    long_description=long_description,
    author="Jeff Forcier",
    author_email="jeff@bitprophet.org",
    url="http://fabfile.org",
    install_requires=[
        "invoke>=1.3,<2.0",
        "paramiko>=2.4",
    ],
    extras_require={
        "testing": testing_deps,
        "pytest": testing_deps + pytest_deps,
    },
    packages=packages,
    entry_points={
        "console_scripts": [
            "{} = {}.main:program.run".format(binary_name, package_name)
        ]
    },
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Environment :: Console",
        "Intended Audience :: Developers",
        "Intended Audience :: System Administrators",
        "License :: OSI Approved :: BSD License",
        "Operating System :: POSIX",
        "Operating System :: Unix",
        "Operating System :: MacOS :: MacOS X",
        "Operating System :: Microsoft :: Windows",
        "Programming Language :: Python",
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.4",
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
        "Topic :: Software Development",
        "Topic :: Software Development :: Build Tools",
        "Topic :: Software Development :: Libraries",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "Topic :: System :: Clustering",
        "Topic :: System :: Software Distribution",
        "Topic :: System :: Systems Administration",
    ],
)
<|endoftext|>


<commit_before>from setuptools import setup, find_packages

from foliant import __version__ as foliant_version

SHORT_DESCRIPTION = 'Modular, Markdown-based documentation generator that makes \
pdf, docx, html, and more.'

try:
    with open('README.md', encoding='utf8') as readme:
        LONG_DESCRIPTION = readme.read()

except FileNotFoundError:
    LONG_DESCRIPTION = SHORT_DESCRIPTION

setup(
    name='foliant',
    version=foliant_version,
    url='https://github.com/foliant-docs/foliant',
    download_url='https://pypi.org/project/foliant',
    license='MIT',
    author='Konstantin Molchanov',
    author_email='moigagoo@live.com',
    description=SHORT_DESCRIPTION,
    long_description=LONG_DESCRIPTION,
    packages=find_packages(),
    platforms='any',
    install_requires=[
        'PyYAML',
        'cliar>=1.1.9',
        'halo>=0.0.10',
        'prompt_toolkit'
    ],
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Environment :: Console',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Documentation',
        'Topic :: Utilities',
        'Programming Language :: Python :: 3.6'
    ],
    entry_points={
        'console_scripts': [
            'foliant=foliant.cli:entry_point'
        ]
    }
)
<commit_msg>Setup: Define content type Markdown for description.<commit_after>from setuptools import setup, find_packages

from foliant import __version__ as foliant_version

SHORT_DESCRIPTION = 'Modular, Markdown-based documentation generator that makes \
pdf, docx, html, and more.'

try:
    with open('README.md', encoding='utf8') as readme:
        LONG_DESCRIPTION = readme.read()

except FileNotFoundError:
    LONG_DESCRIPTION = SHORT_DESCRIPTION

setup(
    name='foliant',
    version=foliant_version,
    url='https://github.com/foliant-docs/foliant',
    download_url='https://pypi.org/project/foliant',
    license='MIT',
    author='Konstantin Molchanov',
    author_email='moigagoo@live.com',
    description=SHORT_DESCRIPTION,
    long_description=LONG_DESCRIPTION,
    long_description_content_type='text/markdown',
    packages=find_packages(),
    platforms='any',
    install_requires=[
        'PyYAML',
        'cliar>=1.1.9',
        'halo>=0.0.10',
        'prompt_toolkit'
    ],
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Environment :: Console',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Documentation',
        'Topic :: Utilities',
        'Programming Language :: Python :: 3.6'
    ],
    entry_points={
        'console_scripts': [
            'foliant=foliant.cli:entry_point'
        ]
    }
)
<|endoftext|>


<commit_before>from setuptools import find_packages, setup
from setuptools.command.install import install
import os

BASEPATH='.eDisGo'

class InstallSetup(install):
    def run(self):
        self.create_edisgo_path()
        install.run(self)

    @staticmethod
    def create_edisgo_path():
        edisgo_path = os.path.join(os.path.expanduser('~'), BASEPATH)
        data_path = os.path.join(edisgo_path, 'data')

        if not os.path.isdir(edisgo_path):
            os.mkdir(edisgo_path)
        if not os.path.isdir(data_path):
            os.mkdir(data_path)

setup(
    name='eDisGo',
    version='0.0.1',
    packages=find_packages(),
    url='https://github.com/openego/eDisGo',
    license='GNU Affero General Public License v3.0',
    author='gplssm, nesnoj, birgits',
    author_email='',
    description='A python package for distribution grid analysis and optimization',
    install_requires = [
        'ding0 >=0.1.2, <=0.1.3',
        'networkx >=1.11, <2.0 ',
        'shapely >= 1.5.12, <= 1.5.12',
        'pandas >=0.20.3, <=0.20.3',
        'pypsa >=0.11.0, <=0.11.0',
        'pyproj >= 1.9.5.1, <= 1.9.5.1',
        'geopy >= 1.11.0, <= 1.11.0'
    ],
    package_data={
        'config': [
            os.path.join('config',
                         'config_system'),
            os.path.join('config',
                         '*.cfg')
        ]
        },
    cmdclass={
      'install': InstallSetup}
)
<commit_msg>Upgrade Ding0<commit_after>from setuptools import find_packages, setup
from setuptools.command.install import install
import os

BASEPATH='.eDisGo'

class InstallSetup(install):
    def run(self):
        self.create_edisgo_path()
        install.run(self)

    @staticmethod
    def create_edisgo_path():
        edisgo_path = os.path.join(os.path.expanduser('~'), BASEPATH)
        data_path = os.path.join(edisgo_path, 'data')

        if not os.path.isdir(edisgo_path):
            os.mkdir(edisgo_path)
        if not os.path.isdir(data_path):
            os.mkdir(data_path)

setup(
    name='eDisGo',
    version='0.0.1',
    packages=find_packages(),
    url='https://github.com/openego/eDisGo',
    license='GNU Affero General Public License v3.0',
    author='gplssm, nesnoj, birgits',
    author_email='',
    description='A python package for distribution grid analysis and optimization',
    install_requires = [
        'ding0==0.1.4+git.00c1c84',
        'networkx >=1.11, <2.0 ',
        'shapely >= 1.5.12, <= 1.5.12',
        'pandas >=0.20.3, <=0.20.3',
        'pypsa >=0.11.0, <=0.11.0',
        'pyproj >= 1.9.5.1, <= 1.9.5.1',
        'geopy >= 1.11.0, <= 1.11.0'
    ],
    package_data={
        'config': [
            os.path.join('config',
                         'config_system'),
            os.path.join('config',
                         '*.cfg')
        ]
        },
    cmdclass={
      'install': InstallSetup}
)
<|endoftext|>


<commit_before>"""
A library to support the Internationalised Domain Names in Applications
(IDNA) protocol as specified in RFC 5890 et.al. This new methodology,
known as IDNA 2008, can generate materially different results to the
previous standard. The library can act as a drop-in replacement for
the "encodings.idna" module.
"""

import io, sys
from setuptools import setup

def main():

    python_version = sys.version_info[:2]
    if python_version < (3,4):
        raise SystemExit("Sorry, Python 3.4 or newer required")

    package_data = {}
    exec(open('idna/package_data.py').read(), package_data)

    arguments = {
        'name': 'idna',
        'packages': ['idna'],
        'version': package_data['__version__'],
        'description': 'Internationalized Domain Names in Applications (IDNA)',
        'long_description': open("README.rst", encoding="UTF-8").read(),
        'author': 'Kim Davies',
        'author_email': 'kim@cynosure.com.au',
        'license': 'BSD-like',
        'url': 'https://github.com/kjd/idna',
        'classifiers': [
            'Development Status :: 5 - Production/Stable',
            'Intended Audience :: Developers',
            'Intended Audience :: System Administrators',
            'License :: OSI Approved :: BSD License',
            'Operating System :: OS Independent',
            'Programming Language :: Python',
            'Programming Language :: Python :: 3',
            'Programming Language :: Python :: 3 :: Only',
            'Programming Language :: Python :: 3.4',
            'Programming Language :: Python :: 3.5',
            'Programming Language :: Python :: 3.6',
            'Programming Language :: Python :: 3.7',
            'Programming Language :: Python :: 3.8',
            'Programming Language :: Python :: Implementation :: CPython',
            'Programming Language :: Python :: Implementation :: PyPy',
            'Topic :: Internet :: Name Service (DNS)',
            'Topic :: Software Development :: Libraries :: Python Modules',
            'Topic :: Utilities',
        ],
        'python_requires': '>=3.4',
        'test_suite': 'tests',
    }

    setup(**arguments)

if __name__ == '__main__':
    main()
<commit_msg>Update license identifier (issue #87)<commit_after>"""
A library to support the Internationalised Domain Names in Applications
(IDNA) protocol as specified in RFC 5890 et.al. This new methodology,
known as IDNA 2008, can generate materially different results to the
previous standard. The library can act as a drop-in replacement for
the "encodings.idna" module.
"""

import io, sys
from setuptools import setup

def main():

    python_version = sys.version_info[:2]
    if python_version < (3,4):
        raise SystemExit("Sorry, Python 3.4 or newer required")

    package_data = {}
    exec(open('idna/package_data.py').read(), package_data)

    arguments = {
        'name': 'idna',
        'packages': ['idna'],
        'version': package_data['__version__'],
        'description': 'Internationalized Domain Names in Applications (IDNA)',
        'long_description': open("README.rst", encoding="UTF-8").read(),
        'author': 'Kim Davies',
        'author_email': 'kim@cynosure.com.au',
        'license': 'BSD-3-Clause',
        'url': 'https://github.com/kjd/idna',
        'classifiers': [
            'Development Status :: 5 - Production/Stable',
            'Intended Audience :: Developers',
            'Intended Audience :: System Administrators',
            'License :: OSI Approved :: BSD License',
            'Operating System :: OS Independent',
            'Programming Language :: Python',
            'Programming Language :: Python :: 3',
            'Programming Language :: Python :: 3 :: Only',
            'Programming Language :: Python :: 3.4',
            'Programming Language :: Python :: 3.5',
            'Programming Language :: Python :: 3.6',
            'Programming Language :: Python :: 3.7',
            'Programming Language :: Python :: 3.8',
            'Programming Language :: Python :: Implementation :: CPython',
            'Programming Language :: Python :: Implementation :: PyPy',
            'Topic :: Internet :: Name Service (DNS)',
            'Topic :: Software Development :: Libraries :: Python Modules',
            'Topic :: Utilities',
        ],
        'python_requires': '>=3.4',
        'test_suite': 'tests',
    }

    setup(**arguments)

if __name__ == '__main__':
    main()
<|endoftext|>


<commit_before>from distutils.core import setup
setup(
	name = 'testrep',
	packages = ['testrep'],
	version = '0.1.2',
	description = 'this is a test upload with simple commands to see if I can install a package with the pip install command',
	author = 'Ernesto Perez',
	author_email = 'ErnestoGPerez91@yahoo.com',
	url = 'https://github.com/ErnestoGP/testrep',
	download_url = 'https://github.com/ErnestoGP/testrep/archive/0.1.2.tar.gz',
	keywords = ['test', 'thing', 'Idunno'],
	classifiers = [],
)
<commit_msg>bugfixing __init__.py<commit_after>from distutils.core import setup
setup(
	name = 'testrep',
	packages = ['testrep'],
	version = '0.1.3',
	description = 'this is a test upload with simple commands to see if I can install a package with the pip install command',
	author = 'Ernesto Perez',
	author_email = 'ErnestoGPerez91@yahoo.com',
	url = 'https://github.com/ErnestoGP/testrep',
	download_url = 'https://github.com/ErnestoGP/testrep/archive/0.1.2.tar.gz',
	keywords = ['test', 'thing', 'Idunno'],
	classifiers = [],
)
<|endoftext|>


<commit_before># -*- coding: utf-8 -*-
import re
from setuptools import setup, find_packages

INSTALL_REQUIRES = (
    'marshmallow>=2.8.0',
)
EXTRAS_REQUIRE = {
    'tests': [
        'pytest',
        'mock',
        'faker==1.0.4',
        'Flask==1.0.2',
    ],
    'lint': [
        'flake8==3.7.7',
        'pre-commit==1.14.4',
    ],
}
EXTRAS_REQUIRE['dev'] = (
    EXTRAS_REQUIRE['tests'] +
    EXTRAS_REQUIRE['lint'] +
    ['tox']
)

def find_version(fname):
    """Attempts to find the version number in the file names fname.
    Raises RuntimeError if not found.
    """
    version = ''
    with open(fname, 'r') as fp:
        reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]')
        for line in fp:
            m = reg.match(line)
            if m:
                version = m.group(1)
                break
    if not version:
        raise RuntimeError('Cannot find version information')
    return version

__version__ = find_version('marshmallow_jsonapi/__init__.py')

def read(fname):
    with open(fname) as fp:
        content = fp.read()
    return content

setup(
    name='marshmallow-jsonapi',
    version=__version__,
    description='JSON API 1.0 (https://jsonapi.org) formatting with marshmallow',
    long_description=read('README.rst'),
    author='Steven Loria',
    author_email='sloria1@gmail.com',
    url='https://github.com/marshmallow-code/marshmallow-jsonapi',
    packages=find_packages(exclude=('test*', )),
    package_dir={'marshmallow-jsonapi': 'marshmallow-jsonapi'},
    include_package_data=True,
    install_requires=INSTALL_REQUIRES,
    extras_require=EXTRAS_REQUIRE,
    license='MIT',
    zip_safe=False,
    keywords=(
        'marshmallow-jsonapi marshmallow marshalling serialization '
        'jsonapi deserialization validation'
    ),
    classifiers=[
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.6',
    ],
    test_suite='tests',
    project_urls={
        'Bug Reports': 'https://github.com/marshmallow-code/marshmallow-jsonapi/issues',
        'Funding': 'https://opencollective.com/marshmallow',
    },
)
<commit_msg>Bump pre-commit from 1.14.4 to 1.15.0<commit_after># -*- coding: utf-8 -*-
import re
from setuptools import setup, find_packages

INSTALL_REQUIRES = (
    'marshmallow>=2.8.0',
)
EXTRAS_REQUIRE = {
    'tests': [
        'pytest',
        'mock',
        'faker==1.0.4',
        'Flask==1.0.2',
    ],
    'lint': [
        'flake8==3.7.7',
        'pre-commit==1.15.0',
    ],
}
EXTRAS_REQUIRE['dev'] = (
    EXTRAS_REQUIRE['tests'] +
    EXTRAS_REQUIRE['lint'] +
    ['tox']
)

def find_version(fname):
    """Attempts to find the version number in the file names fname.
    Raises RuntimeError if not found.
    """
    version = ''
    with open(fname, 'r') as fp:
        reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]')
        for line in fp:
            m = reg.match(line)
            if m:
                version = m.group(1)
                break
    if not version:
        raise RuntimeError('Cannot find version information')
    return version

__version__ = find_version('marshmallow_jsonapi/__init__.py')

def read(fname):
    with open(fname) as fp:
        content = fp.read()
    return content

setup(
    name='marshmallow-jsonapi',
    version=__version__,
    description='JSON API 1.0 (https://jsonapi.org) formatting with marshmallow',
    long_description=read('README.rst'),
    author='Steven Loria',
    author_email='sloria1@gmail.com',
    url='https://github.com/marshmallow-code/marshmallow-jsonapi',
    packages=find_packages(exclude=('test*', )),
    package_dir={'marshmallow-jsonapi': 'marshmallow-jsonapi'},
    include_package_data=True,
    install_requires=INSTALL_REQUIRES,
    extras_require=EXTRAS_REQUIRE,
    license='MIT',
    zip_safe=False,
    keywords=(
        'marshmallow-jsonapi marshmallow marshalling serialization '
        'jsonapi deserialization validation'
    ),
    classifiers=[
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.6',
    ],
    test_suite='tests',
    project_urls={
        'Bug Reports': 'https://github.com/marshmallow-code/marshmallow-jsonapi/issues',
        'Funding': 'https://opencollective.com/marshmallow',
    },
)
<|endoftext|>


<commit_before>from distutils.core import setup

setup(name = 'doit',
      description = 'doit - Automation Tool',
      version = '0.1.0',
      license= 'MIT',
      author = 'Eduardo Naufel Schettino',
      author_email = 'schettino72@gmail.com',
      url = 'http://python-doit.sourceforge.net/',
      classifiers = ['Development Status :: 3 - Alpha',
                     'Environment :: Console',
                     'Intended Audience :: Developers',
                     'License :: OSI Approved :: MIT License',
                     'Natural Language :: English',
                     'Operating System :: POSIX',
                     'Topic :: Software Development :: Build Tools',
                     'Topic :: Software Development :: Quality Assurance',
                     FIXME
                     ],

      packages = ['doit'],
      package_dir = {'':'lib'},
      scripts = ['bin/doit'],

      long_description = FIXME"""
        doit is a build tool that focus not only on making/building things but
        on executing any kind of tasks in an efficient way. Designed to be easy
        to use and "get out of your way"."""
      )

<commit_msg>update setup.py for 0.2 release<commit_after>
from distutils.core import setup

setup(name = 'doit',
      description = 'doit - Automation Tool',
      version = '0.2.0',
      license= 'MIT',
      author = 'Eduardo Naufel Schettino',
      author_email = 'schettino72@gmail.com',
      url = 'http://python-doit.sourceforge.net/',
      classifiers = ['Development Status :: 4 - Beta',
                     'Environment :: Console',
                     'Intended Audience :: Developers',
                     'Intended Audience :: System Administrators',
                     'License :: OSI Approved :: MIT License',
                     'Natural Language :: English',
                     'Operating System :: OS Independent',
                     'Operating System :: POSIX',
                     'Programming Language :: Python :: 2.4',
                     'Programming Language :: Python :: 2.5',
                     'Programming Language :: Python :: 2.6',
                     'Topic :: Software Development :: Build Tools',
                     'Topic :: Software Development :: Testing',
                     'Topic :: Software Development :: Quality Assurance',
                     ],

      packages = ['doit'],
      package_dir = {'':'lib'},
      scripts = ['bin/doit'],

      long_description = """
        doit comes from the idea of bringing the power of build-tools to
        execute any kind of task. It will keep track of dependencies between
        "tasks" and execute them only when necessary. It was designed to be
        easy to use and "get out of your way"."""
      )

<|endoftext|>


<commit_before>import os
import re
from codecs import open

from setuptools import find_packages, setup

# Based on https://github.com/pypa/sampleproject/blob/main/setup.py
# and https://python-packaging-user-guide.readthedocs.org/

here = os.path.abspath(os.path.dirname(__file__))

with open(os.path.join(here, "README.md"), encoding="utf-8") as f:
    long_description = f.read()
long_description_content_type = "text/markdown"

with open(os.path.join(here, "mitmproxy/version.py")) as f:
    match = re.search(r'VERSION = "(.+?)"', f.read())
    assert match
    VERSION = match.group(1)

setup(
    name="mitmproxy",
    version=VERSION,
    description="An interactive, SSL/TLS-capable intercepting proxy for HTTP/1, HTTP/2, and WebSockets.",
    long_description=long_description,
    long_description_content_type=long_description_content_type,
    url="http://mitmproxy.org",
    author="Aldo Cortesi",
    author_email="aldo@corte.si",
    license="MIT",
    classifiers=[
        "License :: OSI Approved :: MIT License",
        "Development Status :: 5 - Production/Stable",
        "Environment :: Console :: Curses",
        "Operating System :: MacOS",
        "Operating System :: POSIX",
        "Operating System :: Microsoft :: Windows",
        "Programming Language :: Python :: 3 :: Only",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: 3.11",
        "Programming Language :: Python :: Implementation :: CPython",
        "Topic :: Security",
        "Topic :: Internet :: WWW/HTTP",
        "Topic :: Internet :: Proxy Servers",
        "Topic :: System :: Networking :: Monitoring",
        "Topic :: Software Development :: Testing",
        "Typing :: Typed",
    ],
    project_urls={
        "Documentation": "https://docs.mitmproxy.org/stable/",
        "Source": "https://github.com/mitmproxy/mitmproxy/",
        "Tracker": "https://github.com/mitmproxy/mitmproxy/issues",
    },
    packages=find_packages(
        include=[
            "mitmproxy",
            "mitmproxy.*",
        ]
    ),
    include_package_data=True,
    entry_points={
        "console_scripts": [
            "mitmproxy = mitmproxy.tools.main:mitmproxy",
            "mitmdump = mitmproxy.tools.main:mitmdump",
            "mitmweb = mitmproxy.tools.main:mitmweb",
        ],
        "pyinstaller40": [
            "hook-dirs = mitmproxy.utils.pyinstaller:hook_dirs",
        ]
    },
    python_requires=">=3.9",
    # https://packaging.python.org/en/latest/discussions/install-requires-vs-requirements/#install-requires
    # It is not considered best practice to use install_requires to pin dependencies to specific versions.
    install_requires=[
        "asgiref>=3.2.10,<3.6",
        "Brotli>=1.0,<1.1",
        "certifi>=2019.9.11",  # no semver here - this should always be on the last release!
        "cryptography>=38.0,<38.1",
        "flask>=1.1.1,<2.3",
        "h11>=0.11,<0.15",
        "h2>=4.1,<5",
        "hyperframe>=6.0,<7",
        "kaitaistruct>=0.10,<0.11",
        "ldap3>=2.8,<2.10",
        "mitmproxy_wireguard>=0.1.6,<0.2",
        "msgpack>=1.0.0, <1.1.0",
        "passlib>=1.6.5, <1.8",
        "protobuf>=3.14,<5",
        "pyOpenSSL>=22.1,<22.2",
        "pyparsing>=2.4.2,<3.1",
        "pyperclip>=1.6.0,<1.9",
        "ruamel.yaml>=0.16,<0.18",
        "sortedcontainers>=2.3,<2.5",
        "tornado>=6.1,<7",
        "urwid>=2.1.1,<2.2",
        "wsproto>=1.0,<1.3",
        "publicsuffix2>=2.20190812,<3",
        "zstandard>=0.11,<0.19",
        "typing-extensions>=4.3,<4.5; python_version<'3.10'",
    ],
    extras_require={
        ':sys_platform == "win32"': [
            "pydivert>=2.0.3,<2.2",
        ],
        "dev": [
            "click>=7.0,<8.2",
            "hypothesis>=5.8,<7",
            "parver>=0.1,<2.0",
            "pdoc>=4.0.0",
            "pyinstaller==5.6.1",
            "pytest-asyncio>=0.17,<0.21",
            "pytest-cov>=2.7.1,<4.1",
            "pytest-timeout>=1.3.3,<2.2",
            "pytest-xdist>=2.1.0,<3.1",
            "pytest>=6.1.0,<8",
            "requests>=2.9.1,<3",
            "tox>=3.5,<4",
            "wheel>=0.36.2,<0.39",
        ],
    },
)
<commit_msg>[requires.io] dependency update on main branch (#5693)<commit_after>import os
import re
from codecs import open

from setuptools import find_packages, setup

# Based on https://github.com/pypa/sampleproject/blob/main/setup.py
# and https://python-packaging-user-guide.readthedocs.org/

here = os.path.abspath(os.path.dirname(__file__))

with open(os.path.join(here, "README.md"), encoding="utf-8") as f:
    long_description = f.read()
long_description_content_type = "text/markdown"

with open(os.path.join(here, "mitmproxy/version.py")) as f:
    match = re.search(r'VERSION = "(.+?)"', f.read())
    assert match
    VERSION = match.group(1)

setup(
    name="mitmproxy",
    version=VERSION,
    description="An interactive, SSL/TLS-capable intercepting proxy for HTTP/1, HTTP/2, and WebSockets.",
    long_description=long_description,
    long_description_content_type=long_description_content_type,
    url="http://mitmproxy.org",
    author="Aldo Cortesi",
    author_email="aldo@corte.si",
    license="MIT",
    classifiers=[
        "License :: OSI Approved :: MIT License",
        "Development Status :: 5 - Production/Stable",
        "Environment :: Console :: Curses",
        "Operating System :: MacOS",
        "Operating System :: POSIX",
        "Operating System :: Microsoft :: Windows",
        "Programming Language :: Python :: 3 :: Only",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: 3.11",
        "Programming Language :: Python :: Implementation :: CPython",
        "Topic :: Security",
        "Topic :: Internet :: WWW/HTTP",
        "Topic :: Internet :: Proxy Servers",
        "Topic :: System :: Networking :: Monitoring",
        "Topic :: Software Development :: Testing",
        "Typing :: Typed",
    ],
    project_urls={
        "Documentation": "https://docs.mitmproxy.org/stable/",
        "Source": "https://github.com/mitmproxy/mitmproxy/",
        "Tracker": "https://github.com/mitmproxy/mitmproxy/issues",
    },
    packages=find_packages(
        include=[
            "mitmproxy",
            "mitmproxy.*",
        ]
    ),
    include_package_data=True,
    entry_points={
        "console_scripts": [
            "mitmproxy = mitmproxy.tools.main:mitmproxy",
            "mitmdump = mitmproxy.tools.main:mitmdump",
            "mitmweb = mitmproxy.tools.main:mitmweb",
        ],
        "pyinstaller40": [
            "hook-dirs = mitmproxy.utils.pyinstaller:hook_dirs",
        ]
    },
    python_requires=">=3.9",
    # https://packaging.python.org/en/latest/discussions/install-requires-vs-requirements/#install-requires
    # It is not considered best practice to use install_requires to pin dependencies to specific versions.
    install_requires=[
        "asgiref>=3.2.10,<3.6",
        "Brotli>=1.0,<1.1",
        "certifi>=2019.9.11",  # no semver here - this should always be on the last release!
        "cryptography>=38.0,<38.1",
        "flask>=1.1.1,<2.3",
        "h11>=0.11,<0.15",
        "h2>=4.1,<5",
        "hyperframe>=6.0,<7",
        "kaitaistruct>=0.10,<0.11",
        "ldap3>=2.8,<2.10",
        "mitmproxy_wireguard>=0.1.6,<0.2",
        "msgpack>=1.0.0, <1.1.0",
        "passlib>=1.6.5, <1.8",
        "protobuf>=3.14,<5",
        "pyOpenSSL>=22.1,<22.2",
        "pyparsing>=2.4.2,<3.1",
        "pyperclip>=1.6.0,<1.9",
        "ruamel.yaml>=0.16,<0.18",
        "sortedcontainers>=2.3,<2.5",
        "tornado>=6.1,<7",
        "urwid>=2.1.1,<2.2",
        "wsproto>=1.0,<1.3",
        "publicsuffix2>=2.20190812,<3",
        "zstandard>=0.11,<0.20",
        "typing-extensions>=4.3,<4.5; python_version<'3.10'",
    ],
    extras_require={
        ':sys_platform == "win32"': [
            "pydivert>=2.0.3,<2.2",
        ],
        "dev": [
            "click>=7.0,<8.2",
            "hypothesis>=5.8,<7",
            "parver>=0.1,<2.0",
            "pdoc>=4.0.0",
            "pyinstaller==5.6.1",
            "pytest-asyncio>=0.17,<0.21",
            "pytest-cov>=2.7.1,<4.1",
            "pytest-timeout>=1.3.3,<2.2",
            "pytest-xdist>=2.1.0,<3.1",
            "pytest>=6.1.0,<8",
            "requests>=2.9.1,<3",
            "tox>=3.5,<4",
            "wheel>=0.36.2,<0.39",
        ],
    },
)
<|endoftext|>


<commit_before>from setuptools import setup, find_packages

setup(
    name="ncplib",
    version="5.0.0",
    license="BSD",
    description="CRFS NCP library for Python 3.",
    author="Dave Hall",
    author_email="dhall@crfs.com",
    url="https://github.com/CRFS/python3-ncplib",
    packages=find_packages(exclude=["tests", "examples"]),
    package_data={"ncplib": ["py.typed"]},
    install_requires=[
        "async_timeout>=3.0,<4.0",
    ],
    classifiers=[
        "Development Status :: 4 - Beta",
        "Environment :: Web Environment",
        "Intended Audience :: Developers",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
    ],
)
<commit_msg>Updating trove classifiers<commit_after>from setuptools import setup, find_packages

setup(
    name="ncplib",
    version="5.0.0",
    license="BSD",
    description="CRFS NCP library for Python 3.",
    author="Dave Hall",
    author_email="dhall@crfs.com",
    url="https://github.com/CRFS/python3-ncplib",
    packages=find_packages(exclude=["tests", "examples"]),
    package_data={"ncplib": ["py.typed"]},
    install_requires=[
        "async_timeout>=3.0,<4.0",
    ],
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Environment :: Web Environment",
        "Intended Audience :: Developers",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
    ],
)
<|endoftext|>